From 6ae0f09ceb5566f84f7cbe9bd2381bc97ef59fce Mon Sep 17 00:00:00 2001 From: Tibo Ulens Date: Fri, 8 Oct 2021 14:41:57 +0200 Subject: [PATCH] actually fix duration code --- messages.asm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/messages.asm b/messages.asm index 0ee0a69..3dbb85d 100644 --- a/messages.asm +++ b/messages.asm @@ -167,7 +167,8 @@ beep: ;; see #NOTE_LOOP ;; the duration counter gets decremented BEFORE ;; it gets compared to zero - sub al, 'b' ; normalise (a=1, b=2, c=...) + ;; ('a' is 0x61) + sub al, 0x60 ; normalise (a=1, b=2, c=...) ;; interrupt 0x16, ah=0 returns the read scancode in ah ;; so ah must be reset @@ -214,7 +215,7 @@ beep: ;; #NOTE_LOOP ;; the duration gets decremented before being checked - ;; hence why it was normalised to 'b' and not 'a' + ;; hence why it was normalised to '`' and not 'a' dec ax ; decrement duration counter jne .pause1 ; keep doing that until it is 0