-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
xas99: allow parentheses in @addresses
- Loading branch information
Showing
9 changed files
with
218 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
* relaxed indexed addresses | ||
|
||
x equ >8300 | ||
work equ >83e0 | ||
|
||
; indexes | ||
mov @x+2, @x | ||
mov @work ^ x, @x(r2) | ||
mov @(work), @x+2(r2) | ||
c @work * 2 ( r1 ), @>1000 ( :101 ) | ||
ab @work + (2 * x ^ >3000) (r9), @7643 | (x + 2) (>a) | ||
|
||
; expressions | ||
c @x & (2 * work + >4), @work ^ x + ~ (r1 + 4 ) | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
* relaxed indexed addresses (reference) | ||
|
||
x equ >8300 | ||
work equ >83e0 | ||
|
||
; indexes | ||
mov @>8302, @>8300 | ||
mov @>e0, @>8300(r2) | ||
mov @>83e0, @>8302(r2) | ||
c @>07c0(r1), @>1000(r5) | ||
ab @>b9e0(r9), @>9fdb(r10) | ||
|
||
; expressions | ||
c @>0300, @>00da | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,124 +1,125 @@ | ||
* ERROR HANDLING: xdt99 extensions | ||
|
||
idt 'ASXERRS' | ||
|
||
; include_path and binary include_path | ||
|
||
txtinc copy "nonexisting" ;ERROR | ||
bininc bcopy "nonexisting" ;ERROR | ||
|
||
; text bytes | ||
|
||
text1 text >123456 | ||
text >12x34 ;ERROR | ||
|
||
; arg count | ||
|
||
* rtwp r1 ; cannt detect this: r1 is comment | ||
* nop @1 ; ditto | ||
inc r1, r2 ;ERROR | ||
byte ;ERROR | ||
text ;ERROR | ||
mov r1 ;ERROR | ||
|
||
; label continuations | ||
|
||
label1: | ||
label2: ;ERROR | ||
clr 0 | ||
|
||
label3: | ||
clr 0 | ||
label3 clr 1 ;ERROR | ||
|
||
label4 clr 0 | ||
label4: | ||
clr 1 ;ERROR | ||
|
||
; .if/.endif nesting | ||
|
||
.ifeq 1, 1 | ||
data 1 | ||
.else | ||
data 2 | ||
.else ;ERROR | ||
data 3 | ||
.endif | ||
|
||
.else ;ERROR | ||
.endif ;ERROR | ||
|
||
.ifeq 1, 1 | ||
.else | ||
.ifne 1, 2 | ||
.endif | ||
.else ;ERROR | ||
.endif | ||
; macros | ||
|
||
.defm mac1 | ||
.endm | ||
.defm mac1 ;ERROR | ||
.endm ; required, as assembly continues | ||
|
||
.defm mac2 | ||
clr #2 ;ERROR:0001 | ||
.endm | ||
.mac2 1 ; error reported on actual line | ||
|
||
.macX ;ERROR | ||
|
||
.defm mac3 | ||
.defm mac4 ;ERROR | ||
.endm | ||
|
||
; weak symbols | ||
w1: | ||
wequ 1 | ||
s2: | ||
equ 2 | ||
w1: | ||
equ 2 ;OK | ||
w1: | ||
equ 1 ;ERROR | ||
w1: | ||
equ 1 ;ERROR | ||
|
||
; 9995 and F18A not available without -5 or -18 | ||
|
||
nnn lst r0 ;ERROR | ||
lwp r1 ;ERROR | ||
divs r2 ;ERROR | ||
mpys *r3+ ;ERROR | ||
|
||
call *r1 ;ERROR | ||
push @nnn ;ERROR | ||
pop r1 ;ERROR | ||
slc r4, 9 ;ERROR | ||
|
||
; hints for incorrect use | ||
uuu b uuu ;ERROR | ||
jmp @uuu ;ERROR | ||
inc 9 ;OK, is warning only | ||
|
||
; auto-constants | ||
|
||
a w#text1, 0 ;ERROR | ||
a w#w#1, 0 ;ERROR | ||
a b#1 + text1, 0 ;ERROR | ||
a 1 + w#1, 0 ;ERROR | ||
a (w#1) + 1, 0 ;ERROR | ||
|
||
; incorrect use of operands | ||
|
||
coc @nnn, @uuu ;ERROR | ||
coc @nnn, w1 ;OK | ||
|
||
* NO ERRORS | ||
|
||
good1: | ||
; comment | ||
clr 0 | ||
|
||
end | ||
* ERROR HANDLING: xdt99 extensions | ||
|
||
idt 'ASXERRS' | ||
|
||
; include_path and binary include_path | ||
|
||
txtinc copy "nonexisting" ;ERROR | ||
bininc bcopy "nonexisting" ;ERROR | ||
|
||
; text bytes | ||
|
||
text1 text >123456 | ||
text >12x34 ;ERROR | ||
|
||
; arg count | ||
|
||
* rtwp r1 ; cannt detect this: r1 is comment | ||
* nop @1 ; ditto | ||
inc r1, r2 ;ERROR | ||
byte ;ERROR | ||
text ;ERROR | ||
mov r1 ;ERROR | ||
|
||
; label continuations | ||
|
||
label1: | ||
label2: ;ERROR | ||
clr 0 | ||
|
||
label3: | ||
clr 0 | ||
label3 clr 1 ;ERROR | ||
|
||
label4 clr 0 | ||
label4: | ||
clr 1 ;ERROR | ||
|
||
; .if/.endif nesting | ||
|
||
.ifeq 1, 1 | ||
data 1 | ||
.else | ||
data 2 | ||
.else ;ERROR | ||
data 3 | ||
.endif | ||
|
||
.else ;ERROR | ||
.endif ;ERROR | ||
|
||
.ifeq 1, 1 | ||
.else | ||
.ifne 1, 2 | ||
.endif | ||
.else ;ERROR | ||
.endif | ||
|
||
; macros | ||
|
||
.defm mac1 | ||
.endm | ||
.defm mac1 ;ERROR | ||
.endm ; required, as assembly continues | ||
|
||
.defm mac2 | ||
clr #2 ;ERROR:0001 | ||
.endm | ||
.mac2 1 ; error reported on actual line | ||
|
||
.macX ;ERROR | ||
|
||
.defm mac3 | ||
.defm mac4 ;ERROR | ||
.endm | ||
|
||
; weak symbols | ||
w1: | ||
wequ 1 | ||
s2: | ||
equ 2 | ||
w1: | ||
equ 2 ;OK | ||
w1: | ||
equ 1 ;ERROR | ||
w1: | ||
equ 1 ;ERROR | ||
|
||
; 9995 and F18A not available without -5 or -18 | ||
|
||
nnn lst r0 ;ERROR | ||
lwp r1 ;ERROR | ||
divs r2 ;ERROR | ||
mpys *r3+ ;ERROR | ||
|
||
call *r1 ;ERROR | ||
push @nnn ;ERROR | ||
pop r1 ;ERROR | ||
slc r4, 9 ;ERROR | ||
|
||
; hints for incorrect use | ||
uuu b uuu ;ERROR | ||
jmp @uuu ;ERROR | ||
inc 9 ;OK, is warning only | ||
|
||
; auto-constants | ||
|
||
a w#text1, 0 ;ERROR | ||
a w#w#1, 0 ;ERROR | ||
a b#1 + text1, 0 ;ERROR | ||
a 1 + w#1, 0 ;ERROR | ||
a (w#1) + 1, 0 ;ERROR | ||
|
||
; incorrect use of operands | ||
|
||
coc @nnn, @uuu ;ERROR | ||
coc @nnn, w1 ;OK | ||
|
||
|
||
* NO ERRORS | ||
|
||
good1: | ||
; comment | ||
clr 0 | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.