File tree Expand file tree Collapse file tree 3 files changed +13
-89
lines changed Expand file tree Collapse file tree 3 files changed +13
-89
lines changed Original file line number Diff line number Diff line change @@ -79,51 +79,13 @@ macro ?!
79
79
namespace .
80
80
end macro
81
81
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
93
83
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
127
89
128
90
purge ?
129
91
end macro
Original file line number Diff line number Diff line change @@ -79,51 +79,13 @@ macro ?!
79
79
namespace .
80
80
end macro
81
81
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
93
83
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
127
89
128
90
purge ?
129
91
end macro
You can’t perform that action at this time.
0 commit comments