Skip to content

Commit ce9bb1c

Browse files
committed
Update fasmg-ez80.
1 parent 1aa83ae commit ce9bb1c

File tree

3 files changed

+13
-89
lines changed

3 files changed

+13
-89
lines changed

src/fatdrvce/macros.inc

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -79,51 +79,13 @@ macro ?!
7979
namespace .
8080
end macro
8181

82-
; copied from ez80.alm
83-
macro calminstruction?.isindirect? argument*
84-
unique done
85-
local isindirect
86-
match ( isindirect ), argument
87-
bno done
88-
match isindirect, isindirect, ()
89-
label done
90-
end macro
91-
92-
calminstruction ld? lhs*, mhs*, rhs
82+
macro ld? lhs*, mhs*, rhs
9383
match , rhs
94-
jyes plain
95-
isindirect lhs
96-
jyes store
97-
isindirect rhs
98-
jno errarguments
99-
load:
100-
execute =ld? mhs, (rhs)
101-
check mhs metadata 1 element 1 eq @ez80.wreg
102-
jyes loadword
103-
loadbyte:
104-
execute =ld? lhs, (rhs + =byte?)
105-
exit
106-
loadword:
107-
execute =ld? lhs, (rhs + =@ez80.=ws)
108-
exit
109-
store:
110-
execute =ld? (lhs), rhs
111-
check rhs metadata 1 element 1 eq @ez80.wreg
112-
jyes storeword
113-
storebyte:
114-
execute =ld? (lhs + =byte?), mhs
115-
exit
116-
storeword:
117-
execute =ld? (lhs + =@ez80.=ws), mhs
118-
exit
119-
plain:
120-
execute =ld? lhs, mhs
121-
exit
122-
errarguments:
123-
err 'invalid arguments'
124-
end calminstruction
125-
126-
purge calminstruction?.isindirect?
84+
ld lhs,mhs
85+
else
86+
ldp lhs,mhs,rhs
87+
end match
88+
end macro
12789

12890
purge ?
12991
end macro

src/msddrvce/macros.inc

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -79,51 +79,13 @@ macro ?!
7979
namespace .
8080
end macro
8181

82-
; copied from ez80.alm
83-
macro calminstruction?.isindirect? argument*
84-
unique done
85-
local isindirect
86-
match ( isindirect ), argument
87-
bno done
88-
match isindirect, isindirect, ()
89-
label done
90-
end macro
91-
92-
calminstruction ld? lhs*, mhs*, rhs
82+
macro ld? lhs*, mhs*, rhs
9383
match , rhs
94-
jyes plain
95-
isindirect lhs
96-
jyes store
97-
isindirect rhs
98-
jno errarguments
99-
load:
100-
execute =ld? mhs, (rhs)
101-
check mhs metadata 1 element 1 eq @ez80.wreg
102-
jyes loadword
103-
loadbyte:
104-
execute =ld? lhs, (rhs + =byte?)
105-
exit
106-
loadword:
107-
execute =ld? lhs, (rhs + =@ez80.=ws)
108-
exit
109-
store:
110-
execute =ld? (lhs), rhs
111-
check rhs metadata 1 element 1 eq @ez80.wreg
112-
jyes storeword
113-
storebyte:
114-
execute =ld? (lhs + =byte?), mhs
115-
exit
116-
storeword:
117-
execute =ld? (lhs + =@ez80.=ws), mhs
118-
exit
119-
plain:
120-
execute =ld? lhs, mhs
121-
exit
122-
errarguments:
123-
err 'invalid arguments'
124-
end calminstruction
125-
126-
purge calminstruction?.isindirect?
84+
ld lhs,mhs
85+
else
86+
ldp lhs,mhs,rhs
87+
end match
88+
end macro
12789

12890
purge ?
12991
end macro

0 commit comments

Comments
 (0)