From e1de44339093a3d47b0257aded13de405a3e861c Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Wed, 15 Jan 2025 22:53:16 +0100 Subject: vendor: Minor updates so 'nasm' is happy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See the 'nasm' utility in https://github.com/mssola/tools.nes. Signed-off-by: Miquel Sabaté Solà --- vendor/bcd16.s | 19 ++++++++----------- vendor/list.nes | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/vendor/bcd16.s b/vendor/bcd16.s index 7839eaf..e660db4 100644 --- a/vendor/bcd16.s +++ b/vendor/bcd16.s @@ -10,16 +10,13 @@ ; ; @mssola: The memory addresses being used here have been modified so they don't ; clash with my programs (from $0x to $8x). - -.p02 +; @mssola: Remove stuff that was not needed for NES/Famicom development. +; @mssola: Rename 'b' to 'lowByte' so it conforms to what 'nasm' expect. ;; Define so you can better manage code that you want included whenever this ;; feature has been included. BCD16_SUPPORT = 1 -.exportzp bcdNum, bcdResult -.export bcdConvert - ; bcdConvert ; ; Given a number in bcdNum (16-bit), converts it to 5 decimal digits @@ -63,13 +60,13 @@ BCD_BITS = 19 ; out, the byte is complete and should be copied to result. ; (This behavior is called a "ring counter".) ; Overwritten. -; b +; lowByte ; Low byte of the result of trial subtraction. ; Overwritten. bcdNum = $80 bcdResult = $82 curDigit = $87 -b = $82 +lowByte = $82 ; ; Completes within 670 cycles. @@ -82,18 +79,18 @@ bcdConvert: ldy #BCD_BITS - 5 @loop: - ; Trial subtract this bit to A:b + ; Trial subtract this bit to A:lowByte sec lda bcdNum sbc bcdTableLo,y - sta b + sta lowByte lda bcdNum+1 sbc bcdTableHi,y - ; If A:b > bcdNum then bcdNum = A:b + ; If A:lowByte > bcdNum then bcdNum = A:lowByte bcc @trial_lower sta bcdNum+1 - lda b + lda lowByte sta bcdNum @trial_lower: diff --git a/vendor/list.nes b/vendor/list.nes index 9e22faf..23fda2e 160000 --- a/vendor/list.nes +++ b/vendor/list.nes @@ -1 +1 @@ -Subproject commit 9e22faffffa20aa256a05468157404006e2e4d1e +Subproject commit 23fda2e0742a9a87fc499816a0872926a1fb570b -- cgit v1.2.3