![]() |
Jupyter at Bryn Mawr College |
|
|
Public notebooks: /services/public/dblank / CS240 Computer Organization / 2015-Fall / Notes |
.ORIG x3000
0101 000 000 1 00000 ; R0 <- R0 and 0
0000 010 000000101 ; BR if zero to next, next statement
0001 000 000 1 00001 ; R0 <- R0 + 1
0001 000 000 1 00010 ; R0 <- R0 + 2
0001 000 000 1 00011 ; R0 <- R0 + 3
0001 000 000 1 00100 ; R0 <- R0 + 4
0001 000 000 1 00101 ; R0 <- R0 + 5
1111 0000 00100101 ; HALT
.END
%exe
%step
For help on the meta commands of LC3 in Jupyter, issue a question mark in a cell:
?
A window will show these contents:
This is the Calysto LC3 Jupyter kernel. LC3 Interactive Magic Directives: %bp [clear | SUSPENDHEX] - show, clear, or set breakpoints %cont - continue running %dis [STARTHEX [STOPHEX]] - dump memory as program %dump [STARTHEX [STOPHEX]] - list memory in hex %exe - execute the program %mem HEXLOCATION HEXVALUE - set memory %pc HEXVALUE - set PC %reg REG HEXVALUE - set register REG to HEXVALUE %regs - show registers %reset - reset LC3 to start state %step - execute the next instruction, increment PC HEX values begin with an 'x' and are composed of 4 0-F digits or letters. To get additional help on these items, use '%help %item'. To see additional magics, use %lsmagic, and put a question mark after a magic name.
%pc x3000
%step
%step
%step
%step
%step
Trying a breakpoint.
%bp x3004
%exe
%step
%cont