Some shit software I was messing with on gb
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

24 lines
234 B

section "home/math.asm", rom0
bits_swap::
ld c, $80
ld b, a
xor a
.loop
rrc b
jr nc, .skip
or c
.skip
rrc c
jr nc, .loop
ret
divide::
ld b, 0
.loop
inc b
sub c
jr nc, .loop
dec b
add c
ret