Skip to content

Commit 1d21dae

Browse files
committed
Finished MOVEM
1 parent 141e40b commit 1d21dae

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/eamodes_SaamAmiri.x68

+20
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,26 @@ shift * data != 0 -> (1-7)
156156

157157
bin7 * MOVEM (6 bit w/Direction)
158158
MOVE.W (A0)+,D6 * grab reg bit masked word
159+
MOVE.W D3,D1 * store temp
160+
ANDI.W #$0038,D1 * bit mask mode bits
161+
CMPI.W #$0020,D1 * compare with -(An) mode bits
162+
BEQ pre_dec * flip bit mask if mode -(An)
163+
BNE skip_pre_dec * else, skip over pre_dec
164+
165+
pre_dec
166+
CLR.L D5 * CLR temp
167+
MOVE.W #15,D7 * init counter
168+
dec_loop
169+
BTST D7,D6 * test for 1 to add to temp
170+
BEQ load_reg * skip if 0
171+
ADDQ #1,D5 * add 1 to reg
172+
173+
load_reg
174+
ROR.W #1,D5 * build towards correct formating
175+
DBF D7,dec_loop * dec if not complete
176+
MOVE.W D5,D6 * overwrite post inc for pre dec bit mask
177+
178+
skip_pre_dec
159179
BTST #10,D3 * check direction bit
160180
BEQ flip_op * Bit tested = 0 -> (<list>,EA)
161181
JSR mode_test * Bit tested = 1 -> (EA,<list>)

0 commit comments

Comments
 (0)