mirror of
https://github.com/byteworksinc/ORCA-Pascal.git
synced 2024-08-19 04:29:21 +00:00
189 lines
2.2 KiB
Plaintext
189 lines
2.2 KiB
Plaintext
macro
|
|
&l move4 &m1,&m2
|
|
lclb &yistwo
|
|
&l ~setm
|
|
~lda &m1
|
|
~sta &m2
|
|
~lda.h &m1
|
|
~sta.h &m2
|
|
~restm
|
|
mend
|
|
macro
|
|
&l ph4 &n1
|
|
aif "&n1"="*",.f
|
|
lclc &c
|
|
&l anop
|
|
&c amid &n1,1,1
|
|
aif "&c"="#",.d
|
|
aif s:longa=1,.a
|
|
rep #%00100000
|
|
.a
|
|
aif "&c"<>"{",.b
|
|
&c amid &n1,l:&n1,1
|
|
aif "&c"<>"}",.g
|
|
&n1 amid &n1,2,l:&n1-2
|
|
ldy #2
|
|
lda (&n1),y
|
|
pha
|
|
lda (&n1)
|
|
pha
|
|
ago .e
|
|
.b
|
|
aif "&c"<>"[",.c
|
|
ldy #2
|
|
lda &n1,y
|
|
pha
|
|
lda &n1
|
|
pha
|
|
ago .e
|
|
.c
|
|
aif "&c"<>"<",.c1
|
|
&n1 amid &n1,2,l:&n1-1
|
|
pei &n1+2
|
|
pei &n1
|
|
ago .e
|
|
.c1
|
|
lda &n1+2
|
|
pha
|
|
lda &n1
|
|
pha
|
|
ago .e
|
|
.d
|
|
&n1 amid &n1,2,l:&n1-1
|
|
pea +(&n1)|-16
|
|
pea &n1
|
|
ago .f
|
|
.e
|
|
aif s:longa=1,.f
|
|
sep #%00100000
|
|
.f
|
|
mexit
|
|
.g
|
|
mnote "Missing closing '}'",16
|
|
mend
|
|
macro
|
|
&l ~lda &op
|
|
lclc &c
|
|
&c amid "&op",1,1
|
|
aif "&c"<>"{",.b
|
|
&c amid "&op",l:&op,1
|
|
aif "&c"="}",.a
|
|
mnote "Missing closing '}'",2
|
|
&op setc &op}
|
|
.a
|
|
&op amid "&op",2,l:&op-2
|
|
&op setc (&op)
|
|
.b
|
|
&l lda &op
|
|
mend
|
|
macro
|
|
&l ~lda.h &op
|
|
&l anop
|
|
lclc &c
|
|
&c amid "&op",1,1
|
|
aif "&c"="[",.b
|
|
aif "&c"<>"{",.d
|
|
&c amid "&op",l:&op,1
|
|
aif "&c"="}",.a
|
|
mnote "Missing closing '}'",2
|
|
&op setc &op}
|
|
.a
|
|
&op amid "&op",2,l:&op-2
|
|
&op setc (&op)
|
|
.b
|
|
aif &yistwo,.c
|
|
&yistwo setb 1
|
|
ldy #2
|
|
.c
|
|
&op setc "&op,y"
|
|
lda &op
|
|
mexit
|
|
.d
|
|
aif "&c"<>"#",.e
|
|
&op amid "&op",2,l:&op-1
|
|
&op setc "#^&op"
|
|
lda &op
|
|
mexit
|
|
.e
|
|
lda 2+&op
|
|
mend
|
|
macro
|
|
&l ~restm
|
|
&l anop
|
|
aif (&~la+&~li)=2,.i
|
|
sep #32*(.not.&~la)+16*(.not.&~li)
|
|
aif &~la,.h
|
|
longa off
|
|
.h
|
|
aif &~li,.i
|
|
longi off
|
|
.i
|
|
mend
|
|
macro
|
|
&l ~setm
|
|
&l anop
|
|
aif c:&~la,.b
|
|
gblb &~la
|
|
gblb &~li
|
|
.b
|
|
&~la setb s:longa
|
|
&~li setb s:longi
|
|
aif s:longa.and.s:longi,.a
|
|
rep #32*(.not.&~la)+16*(.not.&~li)
|
|
longa on
|
|
longi on
|
|
.a
|
|
mend
|
|
macro
|
|
&l ~sta &op
|
|
lclc &c
|
|
&c amid "&op",1,1
|
|
aif "&c"<>"{",.b
|
|
&c amid "&op",l:&op,1
|
|
aif "&c"="}",.a
|
|
mnote "Missing closing '}'",2
|
|
&op setc &op}
|
|
.a
|
|
&op amid "&op",2,l:&op-2
|
|
&op setc (&op)
|
|
.b
|
|
&l sta &op
|
|
mend
|
|
macro
|
|
&l ~sta.h &op
|
|
&l anop
|
|
lclc &c
|
|
&c amid "&op",1,1
|
|
aif "&c"="[",.b
|
|
aif "&c"<>"{",.d
|
|
&c amid "&op",l:&op,1
|
|
aif "&c"="}",.a
|
|
mnote "Missing closing '}'",2
|
|
&op setc &op}
|
|
.a
|
|
&op amid "&op",2,l:&op-2
|
|
&op setc (&op)
|
|
.b
|
|
aif &yistwo,.c
|
|
&yistwo setb 1
|
|
ldy #2
|
|
.c
|
|
&op setc "&op,y"
|
|
sta &op
|
|
mexit
|
|
.d
|
|
sta 2+&op
|
|
mend
|
|
MACRO
|
|
&LAB FD2X
|
|
&LAB PEA $010E
|
|
LDX #$090A
|
|
JSL $E10000
|
|
MEND
|
|
MACRO
|
|
&LAB FX2C
|
|
&LAB PEA $0510
|
|
LDX #$090A
|
|
JSL $E10000
|
|
MEND
|