LC-3

LC-3 (2) - Hello World, Simulator

Kate Choi 2021. 5. 17. 05:05

http://lc3tutor.org/

Very helpful site to practice LC-3

 

 

LC3 Tutor | Simulator, Help, & Examples for LC3 Assembly Language

× Bits Calculator Help The Bits Calculator will convert in 'real-time' (as you type each character) between decimal, hex, unsigned binary, and two's complement binary notation, while also representing the equivalent ASCII character for the current value.

lc3tutor.org


Let's go through the Hello World.asm

 

hello.asm

 

Simulator screen

 

In the simulator, you can see the Registers and the Memory.

In Registers, PC shows the memory where the program starts.

In Memory, x3000(PC) shows LEA R0, HI 

 

You can navigate memory here. PC let you get back to PC

 

Reinitialize Machine would clear everything put null character (below)

 

Reinitialize Machine

 

Randomize Machine would put random numbers everywhere (below)

 

Randomize Machine

 

If you reload it again using Reload Object File button, you'll see everything that wasn't in my object file would still there. Sometimes it's useful to run the program surround by garbage to see it runs properly.

 

Reload Object File