turboscrew's Profile User Rating: -----

Reputation: 103 Stalwart
Active Posts:
683 (0.55 per day)
03-April 12
Profile Views:
Last Active:
User is offline Aug 31 2015 01:49 PM

Previous Fields

OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:

Latest Visitors

Icon   turboscrew has not set their status

Posts I've Made

  1. In Topic: Using LC3 assembly I need to subtract two single digit numbers.

    Posted 31 Aug 2015

    Oops, didn't realize - NOT is 1's complement.
    You need to add 1 to make it 2's complement:
    a - b = a + NOT( b ) + 1

    You read a character with trap x20 (character emerges in low byte of r0).
    You echo it with trap x21 (with character in low byte of r0)
    The decimal digits are converted to binary subtracting '0' (0x30) from the ASCII-code, and vice versa. Multidigit numbers require a bit more.

    It might be a good idea to write a pseudocode first.

    And remember to decide which registers you use for what and where, and stick to the plan (unless you need to rethink that). Otherwise the usage of registers get blurred, and one ends up using wrong registers - like printing address instead of value, or incrementing data instead of counter.
  2. In Topic: How is memory of programs stored in RAM?

    Posted 18 Aug 2015

    Usually a chunk is allocated for code and another chunk for data (MMU).
    The program decides how to use the data area.

    Sometimes you can use system heap - common to all code in the computer. Those blocks are usually mapped block-by-block by the MMU.

    The system heap wastes less memory, but allocation/deallocation are quite heavy operations. You usually allocate what you need and handle the usage 'locally', like
    setting up a heap into it.
  3. In Topic: Using LC3 assembly I need to subtract two single digit numbers.

    Posted 18 Aug 2015

    I don't know about the BIOS and its TRAPS, but about the rest of the stuff: yes.
  4. In Topic: Editing a code to make it echo user inputs by line when enter is press

    Posted 18 Aug 2015

    I take it that this is LC3 assembly?
    I'm not sure, because there are similar instructions in other assembly languages too,
    but they do different things.
    Often STI is 'set interrupt mask' or 'store immediate'. In LC3 that's 'store indexed'. And when it's 'set interrupt mask', in some processors it disables the interrupts and in others it enables interrupts.

     STR R0, R3, #0; copy the wating character into R3

    You don't copy R0 to R3, but store R0 to memory address in R3.
    And still:
    loop3 STI R3, DDR ; Copy the character in R3 to the Data display register

    You print the address instead of the character.

    BTW, make your decision: which register contains the character. R3 or R0.
  5. In Topic: calling another code im RAM without lossing control of the caller

    Posted 12 Jul 2015

    So you wish to run several programs at a time? Then you need a scheduler (or some kind of OS that has a scheduler). Or you need a multicore processor. Those are not as simple to set up as one might think.

My Information

Member Title:
D.I.C Addict
52 years old
February 6, 1963
Nokia (town), Finland
Computers, programming, different branches of science, different branches of technology
Full Name:
Juha Aaltonen
Years Programming:
Programming Languages:
C, C++, Ada, Pascal, Lisp, Occam, Forth, Fortran and some assembly
(6502, 6800, 6809, 68000, 8085, 8031, PDP11/70, basics of C64x+ and PPC)

Contact Information




Page 1 of 1
  1. Photo

    askyy Icon

    06 Apr 2013 - 19:42
    would you like tom give me some help doing a programm in aseembly MIPS to verify if a number is power of two?
  2. Photo

    cool_moon Icon

    24 Apr 2012 - 03:49
    I didnt undestand ur explanation will u please explain it clearly
  3. Photo

    cool_moon Icon

    23 Apr 2012 - 23:29
    hi..Im new to lpc1768 please help me to understand the GPIO selection. how to select the gpio. i worked in mc8051 but it is entirly different from that. kindly help me
  4. Photo

    jon.kiparsky Icon

    10 Apr 2012 - 23:53
    Well, I've tried to set up a discussion. Let's see what comes of it.
    In answer to your question, I found my way to Finnish because my father is a Finn, and I'm interested in languages. As I say, though, Finnish defeated me pretty soundly.
Page 1 of 1