LDRB R6 [R1 2408] | % set the flag ST0 |
ORR R6 R6 1 |
|
STRB R6 [R1 2408] |
|
LDMIA sp! {R4 R5 R6 R7 R8 PC} | % restore all registers and return |
!ASM | % back in ASM mode |
*end |
|
} |
|
C=RSTK D0=C | % D0 points to ARM instruction |
D1=80100 | % D1 points at a place where |
| % I can copy the program |
LC(5) | % copy n nibbles |
C=0.B SETLNED | % hide the header |
D1=8229E | % point on 2Kb free memory |
LC A9 A=0.W
D0=00120 LC 8229E DAT0=C.A | % | point the screen to that memory |
D0=C | % | D0 points to that memory |
LC FFFFEFFF D=C.W | % | |
LC 4F R3=C.B | % | loop 80 times |
{ |
|
|
C=0.W LC 1800 | % | |
LC 82 | % | loop 131 times |
A=0.S A+1.S | % | set bit 0 in As |
{ |
|
|
RSTK=C | % | save loop counter in RSTK |
LC 80100 ARMSAT | % | evaluate the ARM code |
?ST=0.0 | % | if point is in the set, do nothing |
{ |
|
|
C=DAT0.S | % | else, turn the pixel off |
} |
|
|
A+A.S SKNC { D0+1 A+1.S } | % | next pixel |
C=0.W LC 40 B+C.W | % | increment X |
C=RSTK | % | count down and loop |
} |
|
|
D0+2 | % | next graphic line |
C=0.W LC 66 D+C.W | % | increment Y |
C=R3.W | % | count down and loop |
} |
|
|
LC FF OUT=C { C=IN2 ?C=0.B UP } % | wait for no key down | |
{ C=IN2 ?C#0.B UP } | % | Wait for 1 key down |
INTON | % | restore the keyboard interrupt |
LC 10 SETLNED | % | restore the header size |
SCREEN CD0EX D0=00120 DAT0=C.A | % | restore the screen pointer |
LOADRPL | % | return to RPL |
ENDCODE | ( | end of ASM program ) |
; | ( | end of RPL program ) |
@"