home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
utilities
/
utilss
/
sasm
/
SAsm
/
Source
/
Immed
< prev
next >
Wrap
Text File
|
1993-03-20
|
1KB
|
37 lines
;--> Immed
; Just a piece of nonsense to illustrate the
; enhanced second operator using SAsm
; © D.J.Holden 1992
# org &8000 ;assemble code to run at &8000
# type &FF8 ; 'Absolute' application to be loaded at &8000
# size &400 ; Allocate 1K for assembled code
mov r0,"A" ;load ascii 'A' into r0
swi "OS_WriteC" ;and print it
mov r0,"B" ;load ascii 'B' into r0
teq r0,"A" ;see if the contents of r0 = ascii 'B'
swine "OS_WriteC" ;print it only if they're not
mov r0,042 ;load &42 into r0 = ascii 'B'
cmp r0,"C" ;compare with ascii 'C'
addne r0,r0,#1 ;if r0 doesn't = 'C' add one
swi "OS_WriteC" ;print whatever's in r0
swi "OS_NewLine"
swi "OS_Exit" ;quit
; Note that this file doesn't have an #END directive so a
; warning will be given but it will be assembled OK