Reference Guide

6-40 The Development Library
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) end-start MOVEDN % copy n nibbles
C=0.B SETLNED % hide the header
D1=8229E % point on 2Kb free memory
LC A9 A=0.W A-1.W { DAT1=A.W D1+16 C-1.B UPNC } % paint it in black
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 % D=Y=-1
LC 4F R3=C.B % loop 80 times
{
C=0.W LC 1800 C=-C.W B=C.W % B=X=-1.5
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 C-A.S DAT0=C.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 C-1.B UPNC % count down and loop
}
D0+2 % next graphic line
C=0.W LC 66 D+C.W % increment Y
C=R3.W C-1.B R3=C.W UPNC % 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 )
@"