From 6a21f3fcff6135af7da2670464a46a7132be277b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Cuevas?= Date: Thu, 18 Jun 2020 14:47:42 +0200 Subject: [PATCH] Fixed bug with counter and now you can win --- mine.asm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mine.asm b/mine.asm index eb027c0..fc785a3 100644 --- a/mine.asm +++ b/mine.asm @@ -157,7 +157,8 @@ drawmineno: mov bh, 00h ; Set to 0 for graphics modes mov dx, 0013h ; Top row, centered (double digits) int 10h - mov ax, [minecount] ; Get mines + mov ax, 0 + mov al, [minecount] ; Get mines cmp ax, 10 ; See if we have to draw a zero or not jge drawdecimal push ax @@ -166,7 +167,8 @@ drawmineno: pop cx jmp drawunits drawdecimal: - mov ax, [minecount] + mov ax, 0 + mov al, byte [minecount] mov cx, 10 div cl push ax