Skip to content

Commit

Permalink
Fix dl ?.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobly0 committed Nov 2, 2023
1 parent 7000724 commit 8df3e54
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ez80.alm
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,32 @@ iterate <name,size,cond>, w,word,no, l,long,yes
match current =, count, count, ()
jno splitend
splitloop:
match ?, current
jyes splitreserve
execute =@ez80.=word =size?, @current
jump splitnext
splitreserve:
execute =rl? 1
splitnext:
match current =, count, count, ()
jyes splitloop
splitend:
compute count, count
check count
jno repeatend
repeatloop:
match ?, current
arrange duplicate, sequence
match ( duplicate ), sequence
repeatsplitloop:
split current, duplicate
match ?, current
jyes repeatreserve
execute =@ez80.=word =size?, @current
jump repeatnext
repeatreserve:
execute =rl? 1
repeatnext:
jyes repeatsplitloop
compute count, count - 1
check count
Expand Down
1 change: 1 addition & 0 deletions tests/rl.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ include 'ez80.inc'
dl 0
rla
rl 1
dl ?
rl a
test rl 100
Binary file modified tests/rl.bin
Binary file not shown.

0 comments on commit 8df3e54

Please sign in to comment.