add directional characters display
This commit is contained in:
18
src/lib/u64.asm
Normal file
18
src/lib/u64.asm
Normal file
@@ -0,0 +1,18 @@
|
||||
/* Add two unsigned 64 bit
|
||||
|
||||
Input:
|
||||
r1, r2: A.high, A.low
|
||||
r3, r4: B.high, B.low
|
||||
|
||||
Output:
|
||||
r5, r6: C.high, C.low
|
||||
*/
|
||||
pub u64.add:
|
||||
add r5, r1, r3
|
||||
add r6, r2, r4
|
||||
cmp r6, r2
|
||||
jae u64.add_no_low_overflow
|
||||
add r5, r5, 1 ; overflow
|
||||
|
||||
pub u64.add_no_low_overflow:
|
||||
ret
|
||||
Reference in New Issue
Block a user