-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[crt] Add 48-bit add/sub routines, update tests for 48-bit compiler f…
…ixes
- Loading branch information
1 parent
c79fe8d
commit 5ee00b4
Showing
5 changed files
with
55 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
; Performs 48-bit addition | ||
; | ||
; Returns: | ||
; ude:uhl = ude:uhl + uiy:ubc | ||
|
||
assume adl=1 | ||
|
||
section .text | ||
public __i48add | ||
__i48add: | ||
add hl, bc | ||
ex de, hl | ||
push bc | ||
lea bc, iy | ||
adc hl, bc | ||
pop bc | ||
ex de, hl | ||
ret |
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,19 @@ | ||
; Performs 48-bit subtraction | ||
; | ||
; Returns: | ||
; ude:uhl = ude:uhl - uiy:ubc | ||
|
||
assume adl=1 | ||
|
||
section .text | ||
public __i48sub | ||
__i48sub: | ||
or a, a | ||
sbc hl, bc | ||
ex de, hl | ||
push bc | ||
lea bc, iy | ||
sbc hl, bc | ||
pop bc | ||
ex de, hl | ||
ret |
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