commit 0f43fa18fd10edabf459f6e62d29ac390e01863e
parent ead8ea2ea690e27ea29ab5da5d886e441c59cd0e
Author: Léo Villeveygoux <leo.villeveygoux@etu.u-bordeaux.fr>
Date: Sun, 9 Jul 2017 20:02:27 +0200
draw.asm: use byte registers to handle coord wrap
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/draw.asm b/draw.asm
@@ -32,25 +32,25 @@ draw_loop:
mov cl, 1b
and cl, al
jz .check_right
- sub dx, 1
+ dec dl
.check_right:
mov cl, 10b
and cl, al
jz .check_up
- add dx, 1
+ inc dl
.check_up:
mov cl, 100b
and cl, al
jz .check_down
- sub dx, 0x100
+ dec dh
.check_down:
mov cl, 1000b
and cl, al
jz .update_coords
- add dx, 0x100
+ inc dh
.update_coords:
mov [coords], edx