Added division

This commit is contained in:
cannoli-fruit 2026-07-24 03:05:44 -04:00
commit f9a715e3b1
4 changed files with 23 additions and 1 deletions

10
tests/div.asm Normal file
View file

@ -0,0 +1,10 @@
include "fvm.inc"
org 0x4000000000000000
MovI64 r95, UART_TX
MovI64 r2, 64
MovI64 r3, 16
DivR64 r2, r3
MovI64 r4, 48 ; ascii for 0
AddR64 r2, r4
St8 r2, r95

View file

@ -236,6 +236,12 @@ macro AddR64 dst, src
db src
end macro
macro DivR64 dst, src
db 0x72
db dst
db src
end macro
macro RSetF reg
db 0x42
db reg