Resolve #428: Use HIGH(X) and LOW(X) instead of X / $100 and X % $100 or X >> 8 and X & $ff

This commit is contained in:
Remy Oukaour
2017-12-25 13:40:10 -05:00
parent da2b01a36c
commit e34e68095d
71 changed files with 435 additions and 398 deletions

View File

@@ -109,9 +109,9 @@ Printer_StartTransmittingTilemap: ; 84099 (21:4099)
call Printer_CopyPacket
; prepare to send 40 tiles
call Printer_Convert2RowsTo2bpp
ld a, (40 tiles) % $100
ld a, LOW(40 tiles)
ld [wPrinterSendByteCounter], a
ld a, (40 tiles) / $100
ld a, HIGH(40 tiles)
ld [wPrinterSendByteCounter + 1], a
; compute the checksum
call Printer_ComputeChecksum
@@ -142,9 +142,9 @@ Printer_SignalSendHeader: ; 840de (21:40de)
call Printer_CopyPacket
; prepare to send 1 tile
call Printer_StageHeaderForSend
ld a, 4 % $100
ld a, LOW(4)
ld [wPrinterSendByteCounter], a
ld a, 4 / $100
ld a, HIGH(4)
ld [wPrinterSendByteCounter + 1], a
; compute the checksum
call Printer_ComputeChecksum