From 294bb27eec45476eb9c7d18ab530651d40340514 Mon Sep 17 00:00:00 2001 From: Jesper Gravgaard Date: Tue, 2 Jan 2024 19:45:16 +0100 Subject: [PATCH] Updated %nn to 0bnn and $nn to 0xnn. --- src/main/kc/include/c64-keyboard.h | 128 ++++++------ src/main/kc/include/c64dtv.h | 186 +++++++++--------- src/main/kc/include/mos6526.h | 2 +- src/main/kc/include/mos6569.h | 22 +-- src/main/kc/lib/c64-bitmap.c | 12 +- src/main/kc/lib/c64-keyboard.c | 20 +- src/main/kc/lib/c64-print.c | 8 +- src/main/kc/lib/c64.c | 8 +- src/main/kc/lib/c64dtv.c | 2 +- src/main/kc/lib/conio-atarixl.c | 4 +- src/main/kc/lib/cx16-veralib.c | 2 +- src/main/kc/lib/division.c | 4 +- src/main/kc/lib/fastmultiply.c | 24 +-- src/main/kc/lib/mega65-memorymapper.c | 2 +- src/main/kc/lib/mega65.c | 8 +- src/main/kc/lib/sine.c | 16 +- src/test/ref/bitmap-line-anim-1.asm | 12 +- src/test/ref/bitmap-line-anim-1.log | 12 +- src/test/ref/bitmap-line-anim-2.asm | 12 +- src/test/ref/bitmap-line-anim-2.log | 12 +- src/test/ref/bitmap-plot-0.asm | 12 +- src/test/ref/bitmap-plot-0.log | 12 +- src/test/ref/bitmap-plot-3.asm | 12 +- src/test/ref/bitmap-plot-3.log | 12 +- src/test/ref/c-types.asm | 6 +- src/test/ref/c-types.log | 6 +- src/test/ref/cia-timer-cyclecount.asm | 4 +- src/test/ref/cia-timer-cyclecount.log | 4 +- src/test/ref/cia-timer-simple.asm | 4 +- src/test/ref/cia-timer-simple.log | 4 +- src/test/ref/constants.asm | 2 +- src/test/ref/constants.log | 2 +- src/test/ref/ducks-total.asm | 4 +- src/test/ref/ducks-total.log | 4 +- src/test/ref/euclid-3.asm | 6 +- src/test/ref/euclid-3.log | 6 +- src/test/ref/examples/c64/3d/perspective.asm | 6 +- src/test/ref/examples/c64/3d/perspective.log | 6 +- .../c64/bresenham/bitmap-bresenham.asm | 12 +- .../c64/bresenham/bitmap-bresenham.log | 12 +- .../c64/fastmultiply/fastmultiply8.asm | 4 +- .../c64/fastmultiply/fastmultiply8.log | 4 +- .../ref/examples/mega65/memorymap-test.asm | 2 +- .../ref/examples/mega65/memorymap-test.log | 2 +- src/test/ref/gfxbank.asm | 2 +- src/test/ref/gfxbank.log | 2 +- src/test/ref/incrementinarray.asm | 2 +- src/test/ref/incrementinarray.log | 2 +- src/test/ref/linegen.asm | 10 +- src/test/ref/linegen.log | 10 +- .../ref/millfork-benchmarks/linkedlist-kc.asm | 6 +- .../ref/millfork-benchmarks/linkedlist-kc.log | 6 +- .../ref/millfork-benchmarks/plasma-kc.asm | 6 +- .../ref/millfork-benchmarks/plasma-kc.log | 6 +- .../ref/millfork-benchmarks/romsum-kc.asm | 6 +- .../ref/millfork-benchmarks/romsum-kc.log | 6 +- src/test/ref/millfork-benchmarks/sieve-kc.asm | 6 +- src/test/ref/millfork-benchmarks/sieve-kc.log | 6 +- src/test/ref/min-fmul-16.asm | 4 +- src/test/ref/min-fmul-16.log | 4 +- src/test/ref/multiply-16bit-const.asm | 2 +- src/test/ref/multiply-16bit-const.log | 2 +- src/test/ref/primes-1000-2.asm | 4 +- src/test/ref/primes-1000-2.log | 4 +- src/test/ref/printmsg.asm | 2 +- src/test/ref/printmsg.log | 2 +- src/test/ref/processor-port-test.asm | 6 +- src/test/ref/processor-port-test.log | 6 +- src/test/ref/semi-struct-1.asm | 6 +- src/test/ref/semi-struct-1.log | 6 +- src/test/ref/sieve-min.asm | 4 +- src/test/ref/sieve-min.log | 4 +- src/test/ref/signed-indexed-subtract.asm | 6 +- src/test/ref/signed-indexed-subtract.log | 6 +- src/test/ref/sinus-basic.asm | 6 +- src/test/ref/sinus-basic.log | 6 +- src/test/ref/sinusgen16.asm | 12 +- src/test/ref/sinusgen16.log | 12 +- src/test/ref/struct-ptr-22.asm | 6 +- src/test/ref/struct-ptr-22.log | 6 +- src/test/ref/struct-ptr-26.asm | 4 +- src/test/ref/struct-ptr-26.log | 4 +- src/test/ref/test-comparisons-sword.asm | 6 +- src/test/ref/test-comparisons-sword.log | 6 +- src/test/ref/test-comparisons-word.asm | 6 +- src/test/ref/test-comparisons-word.log | 6 +- src/test/ref/test-keyboard-space.asm | 4 +- src/test/ref/test-keyboard-space.log | 4 +- src/test/ref/test-keyboard.asm | 4 +- src/test/ref/test-keyboard.log | 4 +- src/test/ref/test-lowhigh.asm | 6 +- src/test/ref/test-lowhigh.log | 6 +- src/test/ref/test-signed-word-minus-byte.asm | 6 +- src/test/ref/test-signed-word-minus-byte.log | 6 +- src/test/ref/travis1.asm | 2 +- src/test/ref/travis1.log | 2 +- 96 files changed, 456 insertions(+), 456 deletions(-) diff --git a/src/main/kc/include/c64-keyboard.h b/src/main/kc/include/c64-keyboard.h index 861047db1..cdcf9e1cb 100644 --- a/src/main/kc/include/c64-keyboard.h +++ b/src/main/kc/include/c64-keyboard.h @@ -21,70 +21,70 @@ /// Keyboard Codes for all 63 keys. /// Keyboard Codes are %00rrrccc, where rrr is the row ID (0-7) and ccc is the column ID (0-7). /// See C64 Keyboard Matrix Reference http://codebase64.org/doku.php?id=base:reading_the_keyboard -const char KEY_DEL = $00; -const char KEY_RETURN = $01; -const char KEY_CRSR_RIGHT = $02; -const char KEY_F7 = $03; -const char KEY_F1 = $04; -const char KEY_F3 = $05; -const char KEY_F5 = $06; -const char KEY_CRSR_DOWN = $07; -const char KEY_3 = $08; -const char KEY_W = $09; -const char KEY_A = $0a; -const char KEY_4 = $0b; -const char KEY_Z = $0c; -const char KEY_S = $0d; -const char KEY_E = $0e; -const char KEY_LSHIFT = $0f; -const char KEY_5 = $10; -const char KEY_R = $11; -const char KEY_D = $12; -const char KEY_6 = $13; -const char KEY_C = $14; -const char KEY_F = $15; -const char KEY_T = $16; -const char KEY_X = $17; -const char KEY_7 = $18; -const char KEY_Y = $19; -const char KEY_G = $1a; -const char KEY_8 = $1b; -const char KEY_B = $1c; -const char KEY_H = $1d; -const char KEY_U = $1e; -const char KEY_V = $1f; -const char KEY_9 = $20; -const char KEY_I = $21; -const char KEY_J = $22; -const char KEY_0 = $23; -const char KEY_M = $24; -const char KEY_K = $25; -const char KEY_O = $26; -const char KEY_N = $27; -const char KEY_PLUS = $28; -const char KEY_P = $29; -const char KEY_L = $2a; -const char KEY_MINUS = $2b; -const char KEY_DOT = $2c; -const char KEY_COLON = $2d; -const char KEY_AT = $2e; -const char KEY_COMMA = $2f; -const char KEY_POUND = $30; -const char KEY_ASTERISK = $31; -const char KEY_SEMICOLON = $32; -const char KEY_HOME = $33; -const char KEY_RSHIFT = $34; -const char KEY_EQUALS = $35; -const char KEY_ARROW_UP = $36; -const char KEY_SLASH = $37; -const char KEY_1 = $38; -const char KEY_ARROW_LEFT = $39; -const char KEY_CTRL = $3a; -const char KEY_2 = $3b; -const char KEY_SPACE = $3c; -const char KEY_COMMODORE = $3d; -const char KEY_Q = $3e; -const char KEY_RUNSTOP = $3f; +const char KEY_DEL = 0x00; +const char KEY_RETURN = 0x01; +const char KEY_CRSR_RIGHT = 0x02; +const char KEY_F7 = 0x03; +const char KEY_F1 = 0x04; +const char KEY_F3 = 0x05; +const char KEY_F5 = 0x06; +const char KEY_CRSR_DOWN = 0x07; +const char KEY_3 = 0x08; +const char KEY_W = 0x09; +const char KEY_A = 0x0a; +const char KEY_4 = 0x0b; +const char KEY_Z = 0x0c; +const char KEY_S = 0x0d; +const char KEY_E = 0x0e; +const char KEY_LSHIFT = 0x0f; +const char KEY_5 = 0x10; +const char KEY_R = 0x11; +const char KEY_D = 0x12; +const char KEY_6 = 0x13; +const char KEY_C = 0x14; +const char KEY_F = 0x15; +const char KEY_T = 0x16; +const char KEY_X = 0x17; +const char KEY_7 = 0x18; +const char KEY_Y = 0x19; +const char KEY_G = 0x1a; +const char KEY_8 = 0x1b; +const char KEY_B = 0x1c; +const char KEY_H = 0x1d; +const char KEY_U = 0x1e; +const char KEY_V = 0x1f; +const char KEY_9 = 0x20; +const char KEY_I = 0x21; +const char KEY_J = 0x22; +const char KEY_0 = 0x23; +const char KEY_M = 0x24; +const char KEY_K = 0x25; +const char KEY_O = 0x26; +const char KEY_N = 0x27; +const char KEY_PLUS = 0x28; +const char KEY_P = 0x29; +const char KEY_L = 0x2a; +const char KEY_MINUS = 0x2b; +const char KEY_DOT = 0x2c; +const char KEY_COLON = 0x2d; +const char KEY_AT = 0x2e; +const char KEY_COMMA = 0x2f; +const char KEY_POUND = 0x30; +const char KEY_ASTERISK = 0x31; +const char KEY_SEMICOLON = 0x32; +const char KEY_HOME = 0x33; +const char KEY_RSHIFT = 0x34; +const char KEY_EQUALS = 0x35; +const char KEY_ARROW_UP = 0x36; +const char KEY_SLASH = 0x37; +const char KEY_1 = 0x38; +const char KEY_ARROW_LEFT = 0x39; +const char KEY_CTRL = 0x3a; +const char KEY_2 = 0x3b; +const char KEY_SPACE = 0x3c; +const char KEY_COMMODORE = 0x3d; +const char KEY_Q = 0x3e; +const char KEY_RUNSTOP = 0x3f; /// Initialize keyboard reading by setting CIA#$ Data Direction Registers void keyboard_init(); diff --git a/src/main/kc/include/c64dtv.h b/src/main/kc/include/c64dtv.h index 9edd775d6..cd02a13d4 100644 --- a/src/main/kc/include/c64dtv.h +++ b/src/main/kc/include/c64dtv.h @@ -9,58 +9,58 @@ #include /// Feature enables or disables the extra C64 DTV features -char* const DTV_FEATURE = (char*)$d03f; +char* const DTV_FEATURE = (char*)0xd03f; const char DTV_FEATURE_ENABLE = 1; const char DTV_FEATURE_DISABLE_TIL_RESET = 2; /// Controls the graphics modes of the C64 DTV -char* const DTV_CONTROL = (char*)$d03c; -const char DTV_LINEAR = $01; -const char DTV_BORDER_OFF = $02; -const char DTV_HIGHCOLOR = $04; -const char DTV_OVERSCAN = $08; -const char DTV_COLORRAM_OFF = $10; -const char DTV_BADLINE_OFF = $20; -const char DTV_CHUNKY = $40; +char* const DTV_CONTROL = (char*)0xd03c; +const char DTV_LINEAR = 0x01; +const char DTV_BORDER_OFF = 0x02; +const char DTV_HIGHCOLOR = 0x04; +const char DTV_OVERSCAN = 0x08; +const char DTV_COLORRAM_OFF = 0x10; +const char DTV_BADLINE_OFF = 0x20; +const char DTV_CHUNKY = 0x40; /// Defines colors for the 16 first colors ($00-$0f) -char* const DTV_PALETTE = (char*)$d200; +char* const DTV_PALETTE = (char*)0xd200; /// Default vallues for the palette -char DTV_PALETTE_DEFAULT[16] = { $00, $0f, $36, $be, $58, $db, $86, $ff, $29, $26, $3b, $05, $07, $df, $9a, $0a }; +char DTV_PALETTE_DEFAULT[16] = { 0x00, 0x0f, 0x36, 0xbe, 0x58, 0xdb, 0x86, 0xff, 0x29, 0x26, 0x3b, 0x05, 0x07, 0xdf, 0x9a, 0x0a }; /// Linear Graphics Plane A Counter Control -char* const DTV_PLANEA_START_LO = (char*)$d03a; -char* const DTV_PLANEA_START_MI = (char*)$d03b; -char* const DTV_PLANEA_START_HI = (char*)$d045; -char* const DTV_PLANEA_STEP = (char*)$d046; -char* const DTV_PLANEA_MODULO_LO = (char*)$d038; -char* const DTV_PLANEA_MODULO_HI = (char*)$d039; +char* const DTV_PLANEA_START_LO = (char*)0xd03a; +char* const DTV_PLANEA_START_MI = (char*)0xd03b; +char* const DTV_PLANEA_START_HI = (char*)0xd045; +char* const DTV_PLANEA_STEP = (char*)0xd046; +char* const DTV_PLANEA_MODULO_LO = (char*)0xd038; +char* const DTV_PLANEA_MODULO_HI = (char*)0xd039; /// Linear Graphics Plane B Counter Control -char* const DTV_PLANEB_START_LO = (char*)$d049; -char* const DTV_PLANEB_START_MI = (char*)$d04a; -char* const DTV_PLANEB_START_HI = (char*)$d04b; -char* const DTV_PLANEB_STEP = (char*)$d04c; -char* const DTV_PLANEB_MODULO_LO = (char*)$d047; -char* const DTV_PLANEB_MODULO_HI = (char*)$d048; +char* const DTV_PLANEB_START_LO = (char*)0xd049; +char* const DTV_PLANEB_START_MI = (char*)0xd04a; +char* const DTV_PLANEB_START_HI = (char*)0xd04b; +char* const DTV_PLANEB_STEP = (char*)0xd04c; +char* const DTV_PLANEB_MODULO_LO = (char*)0xd047; +char* const DTV_PLANEB_MODULO_HI = (char*)0xd048; /// Select memory bank where sprite data is fetched from (bits 5:0) - source only (J) /// Memory address of Sprite RAM is SpriteBank*$10000 -char* const DTV_SPRITE_BANK = (char*)$d04d; +char* const DTV_SPRITE_BANK = (char*)0xd04d; /// Select memory bank where color data is fetched from (bits 11:0) /// Memory address of Color RAM is ColorBank*$400 -char* const DTV_COLOR_BANK_LO = (char*)$d036; -char* const DTV_COLOR_BANK_HI = (char*)$d037; +char* const DTV_COLOR_BANK_LO = (char*)0xd036; +char* const DTV_COLOR_BANK_HI = (char*)0xd037; -const unsigned long DTV_COLOR_BANK_DEFAULT = $1d800; +const unsigned long DTV_COLOR_BANK_DEFAULT = 0x1d800; /// Selects memory bank for normal VIC color mode and lower data for high color modes. (bits 5:0) /// Memory address of VIC Graphics is GraphicsBank*$10000 -char* const DTV_GRAPHICS_VIC_BANK = (char*)$d03d; +char* const DTV_GRAPHICS_VIC_BANK = (char*)0xd03d; /// Selects memory bank for upper data for high color modes. (bits 5:0) - source only (H) -char* const DTV_GRAPHICS_HICOL_BANK = (char*)$d03e; +char* const DTV_GRAPHICS_HICOL_BANK = (char*)0xd03e; /// Set the memory pointed to by CPU BANK 1 SEGMENT ($4000-$7fff) /// This sets which actual memory is addressed when the CPU reads/writes to $4000-$7fff @@ -68,107 +68,107 @@ char* const DTV_GRAPHICS_HICOL_BANK = (char*)$d03e; void dtvSetCpuBankSegment1(char cpuBankIdx); /// Blitter Source A Start -char* const DTV_BLITTER_SRCA_LO = (char*)$d320; -char* const DTV_BLITTER_SRCA_MI = (char*)$d321; -char* const DTV_BLITTER_SRCA_HI = (char*)$d322; +char* const DTV_BLITTER_SRCA_LO = (char*)0xd320; +char* const DTV_BLITTER_SRCA_MI = (char*)0xd321; +char* const DTV_BLITTER_SRCA_HI = (char*)0xd322; /// Blitter Source A Modulo -char* const DTV_BLITTER_SRCA_MOD_LO = (char*)$d323; -char* const DTV_BLITTER_SRCA_MOD_HI = (char*)$d324; +char* const DTV_BLITTER_SRCA_MOD_LO = (char*)0xd323; +char* const DTV_BLITTER_SRCA_MOD_HI = (char*)0xd324; /// Blitter Source A Line Length -char* const DTV_BLITTER_SRCA_LIN_LO = (char*)$d325; -char* const DTV_BLITTER_SRCA_LIN_HI = (char*)$d326; +char* const DTV_BLITTER_SRCA_LIN_LO = (char*)0xd325; +char* const DTV_BLITTER_SRCA_LIN_HI = (char*)0xd326; /// Blitter Source A Step ([7:4] integral part, [3:0] fractional part) -char* const DTV_BLITTER_SRCA_STEP = (char*)$d327; +char* const DTV_BLITTER_SRCA_STEP = (char*)0xd327; /// Blitter Source B Start -char* const DTV_BLITTER_SRCB_LO = (char*)$d328; -char* const DTV_BLITTER_SRCB_MI = (char*)$d329; -char* const DTV_BLITTER_SRCB_HI = (char*)$d32a; +char* const DTV_BLITTER_SRCB_LO = (char*)0xd328; +char* const DTV_BLITTER_SRCB_MI = (char*)0xd329; +char* const DTV_BLITTER_SRCB_HI = (char*)0xd32a; /// Blitter Source B Modulo -char* const DTV_BLITTER_SRCB_MOD_LO = (char*)$d32b; -char* const DTV_BLITTER_SRCB_MOD_HI = (char*)$d32c; +char* const DTV_BLITTER_SRCB_MOD_LO = (char*)0xd32b; +char* const DTV_BLITTER_SRCB_MOD_HI = (char*)0xd32c; /// Blitter Source B Line Length -char* const DTV_BLITTER_SRCB_LIN_LO = (char*)$d32d; -char* const DTV_BLITTER_SRCB_LIN_HI = (char*)$d32e; +char* const DTV_BLITTER_SRCB_LIN_LO = (char*)0xd32d; +char* const DTV_BLITTER_SRCB_LIN_HI = (char*)0xd32e; /// Blitter Source B Step ([7:4] integral part, [3:0] fractional part) -char* const DTV_BLITTER_SRCB_STEP = (char*)$d32f; +char* const DTV_BLITTER_SRCB_STEP = (char*)0xd32f; /// Blitter Destination Start -char* const DTV_BLITTER_DEST_LO = (char*)$d330; -char* const DTV_BLITTER_DEST_MI = (char*)$d331; -char* const DTV_BLITTER_DEST_HI = (char*)$d332; +char* const DTV_BLITTER_DEST_LO = (char*)0xd330; +char* const DTV_BLITTER_DEST_MI = (char*)0xd331; +char* const DTV_BLITTER_DEST_HI = (char*)0xd332; /// Blitter Source B Modulo -char* const DTV_BLITTER_DEST_MOD_LO = (char*)$d333; -char* const DTV_BLITTER_DEST_MOD_HI = (char*)$d334; +char* const DTV_BLITTER_DEST_MOD_LO = (char*)0xd333; +char* const DTV_BLITTER_DEST_MOD_HI = (char*)0xd334; /// Blitter Source B Line Length -char* const DTV_BLITTER_DEST_LIN_LO = (char*)$d335; -char* const DTV_BLITTER_DEST_LIN_HI = (char*)$d336; +char* const DTV_BLITTER_DEST_LIN_LO = (char*)0xd335; +char* const DTV_BLITTER_DEST_LIN_HI = (char*)0xd336; /// Blitter Source B Step ([7:4] integral part, [3:0] fractional part) -char* const DTV_BLITTER_DEST_STEP = (char*)$d337; +char* const DTV_BLITTER_DEST_STEP = (char*)0xd337; /// Blitter Blit Length -char* const DTV_BLITTER_LEN_LO = (char*)$d338; -char* const DTV_BLITTER_LEN_HI = (char*)$d339; +char* const DTV_BLITTER_LEN_LO = (char*)0xd338; +char* const DTV_BLITTER_LEN_HI = (char*)0xd339; /// Blitter Control -char* const DTV_BLITTER_CONTROL = (char*)$d33a; +char* const DTV_BLITTER_CONTROL = (char*)0xd33a; /// Bit[0] Force Start Strobe when set -const char DTV_BLIT_FORCE_START = %00000001; +const char DTV_BLIT_FORCE_START = 0b00000001; /// Bit[1] Source A Direction Positive when set -const char DTV_BLIT_SRCA_FWD = %00000010; +const char DTV_BLIT_SRCA_FWD = 0b00000010; /// Bit[2] Source B Direction Positive when set -const char DTV_BLIT_SRCB_FWD = %00000100; +const char DTV_BLIT_SRCB_FWD = 0b00000100; /// Bit[3] Destination Direction Positive when set -const char DTV_BLIT_DEST_FWD = %00001000; +const char DTV_BLIT_DEST_FWD = 0b00001000; /// Bit[4] VIC IRQ Start when set -const char DTV_BLIT_VIC_IRQ = %00010000; +const char DTV_BLIT_VIC_IRQ = 0b00010000; /// Bit[5] CIA IRQ Start when set($DCXX CIA) -const char DTV_BLIT_CIA_IRQ = %00100000; +const char DTV_BLIT_CIA_IRQ = 0b00100000; /// Bit[6] V Blank Start when set -const char DTV_BLIT_VBLANK = %01000000; +const char DTV_BLIT_VBLANK = 0b01000000; /// Bit[7] Blitter IRQ Enable when set -const char DTV_BLIT_IRQ_EN = %10000000; +const char DTV_BLIT_IRQ_EN = 0b10000000; /// Blitter Transparency -char* const DTV_BLITTER_TRANSPARANCY = (char*)$d33b; +char* const DTV_BLITTER_TRANSPARANCY = (char*)0xd33b; /// Bit[0] Disable Channel B. /// (data into b port of ALU is forced to %00000000. ALU functions as normal) -const char DTV_BLIT_DISABLE_B = %00000001; +const char DTV_BLIT_DISABLE_B = 0b00000001; /// Bit[1] Write Transparent Data when set //(Data will be written if source a data *IS* %00000000. This can be used with channel b and ALU set to OR to write Data masked by source A.) Cycles will be saved if No writes. -const char DTV_BLIT_WRITE_TRANSPARENT = %00000010; +const char DTV_BLIT_WRITE_TRANSPARENT = 0b00000010; /// Bit[2] Write Non Transparent /// when set (Data will be written if SourceA fetched data is *NOT* %00000000. This may be used combined with channel b data and/or ALU) Cycles will be Saved if no write. Bit[2]==Bit[1]==0: write in any case -const char DTV_BLIT_WRITE_NONTRANSPARENT = %00000100; +const char DTV_BLIT_WRITE_NONTRANSPARENT = 0b00000100; /// No transparancy /// Bit[2]==Bit[1]==0: write in any case -const char DTV_BLIT_TRANSPARANCY_NONE = %00000000; +const char DTV_BLIT_TRANSPARANCY_NONE = 0b00000000; /// Controls the ALU operation -char* DTV_BLITTER_ALU = (char*)$d33e; +char* DTV_BLITTER_ALU = (char*)0xd33e; /// Bit[2:0] Source A right Shift: 000 SourceA Data, 001 LastA[0],SourceA[7:1], ..., 111 LastA[6:0],SourceA[7] -const char DTV_BLIT_SHIFT0 = %00000000; -const char DTV_BLIT_SHIFT1 = %00000001; -const char DTV_BLIT_SHIFT2 = %00000010; -const char DTV_BLIT_SHIFT3 = %00000011; -const char DTV_BLIT_SHIFT4 = %00000100; -const char DTV_BLIT_SHIFT5 = %00000101; -const char DTV_BLIT_SHIFT6 = %00000110; -const char DTV_BLIT_SHIFT7 = %00000111; +const char DTV_BLIT_SHIFT0 = 0b00000000; +const char DTV_BLIT_SHIFT1 = 0b00000001; +const char DTV_BLIT_SHIFT2 = 0b00000010; +const char DTV_BLIT_SHIFT3 = 0b00000011; +const char DTV_BLIT_SHIFT4 = 0b00000100; +const char DTV_BLIT_SHIFT5 = 0b00000101; +const char DTV_BLIT_SHIFT6 = 0b00000110; +const char DTV_BLIT_SHIFT7 = 0b00000111; /// Bit[5:3] Minterms/ALU -const char DTV_BLIT_AND = %00000000; -const char DTV_BLIT_NAND = %00001000; -const char DTV_BLIT_NOR = %00010000; -const char DTV_BLIT_OR = %00011000; -const char DTV_BLIT_XOR = %00100000; -const char DTV_BLIT_XNOR = %00101000; -const char DTV_BLIT_ADD = %00110000; -const char DTV_BLIT_SUB = %00111000; +const char DTV_BLIT_AND = 0b00000000; +const char DTV_BLIT_NAND = 0b00001000; +const char DTV_BLIT_NOR = 0b00010000; +const char DTV_BLIT_OR = 0b00011000; +const char DTV_BLIT_XOR = 0b00100000; +const char DTV_BLIT_XNOR = 0b00101000; +const char DTV_BLIT_ADD = 0b00110000; +const char DTV_BLIT_SUB = 0b00111000; /// Blitter Control 2 -char* const DTV_BLITTER_CONTROL2 = (char*)$d33f; +char* const DTV_BLITTER_CONTROL2 = (char*)0xd33f; /// Bit[0] Clear Blitter IRQ -const char DTV_BLIT_CLEAR_IRQ = %00000001; +const char DTV_BLIT_CLEAR_IRQ = 0b00000001; /// Bit[1] Source A Continue -const char DTV_BLIT_SRCA_CONT = %00000010; +const char DTV_BLIT_SRCA_CONT = 0b00000010; /// Bit[2] Source B Continue -const char DTV_BLIT_SRCB_CONT = %00000100; +const char DTV_BLIT_SRCB_CONT = 0b00000100; /// Bit[3] Destination Continue -const char DTV_BLIT_DEST_CONT = %00001000; +const char DTV_BLIT_DEST_CONT = 0b00001000; /// Bit[0] Busy when set (When reading) -const char DTV_BLIT_STATUS_BUSY = %00000001; +const char DTV_BLIT_STATUS_BUSY = 0b00000001; /// Bit[1] IRQ when set (When reading) -const char DTV_BLIT_STATUS_IRQ = %00000010; +const char DTV_BLIT_STATUS_IRQ = 0b00000010; diff --git a/src/main/kc/include/mos6526.h b/src/main/kc/include/mos6526.h index 8e2b79116..ce02a0344 100644 --- a/src/main/kc/include/mos6526.h +++ b/src/main/kc/include/mos6526.h @@ -37,7 +37,7 @@ struct MOS6526_CIA { }; /// Value that disables all CIA interrupts when stored to the CIA Interrupt registers -const char CIA_INTERRUPT_CLEAR_ALL = $7f; +const char CIA_INTERRUPT_CLEAR_ALL = 0x7f; /// CIA Interrupt: Mask for clearing CIA interrupt flags. const char CIA_INTERRUPT_CLEAR = 0x00; /// CIA Interrupt: Mask for setting CIA interrupt flags. diff --git a/src/main/kc/include/mos6569.h b/src/main/kc/include/mos6569.h index 1f0c60c15..851f7a87b 100644 --- a/src/main/kc/include/mos6569.h +++ b/src/main/kc/include/mos6569.h @@ -216,19 +216,19 @@ char* const VICII_CONTROL1 = (char*)0xd011; /// @see #VICII_CONTROL1 char* const D011 = (char*)0xd011; /// $D011 Control Register #1 Bit#7: RST8 9th Bit for $D012 Rasterline counter -const char VICII_RST8 = %10000000; +const char VICII_RST8 = 0b10000000; /// $D011 Control Register #1 Bit#6: ECM Turn Extended Color Mode on/off -const char VICII_ECM = %01000000; +const char VICII_ECM = 0b01000000; /// $D011 Control Register #1 Bit#5: BMM Turn Bitmap Mode on/off -const char VICII_BMM = %00100000; +const char VICII_BMM = 0b00100000; /// $D011 Control Register #1 Bit#4: DEN Switch VIC-II output on/off -const char VICII_DEN = %00010000; +const char VICII_DEN = 0b00010000; /// $D011 Control Register #1 Bit#3: RSEL Switch betweem 25 or 24 visible rows /// RSEL| Display window height | First line | Last line /// ----+--------------------------+-------------+---------- /// 0 | 24 text lines/192 pixels | 55 ($37) | 246 ($f6) /// 1 | 25 text lines/200 pixels | 51 ($33) | 250 ($fa) -const char VICII_RSEL = %00001000; +const char VICII_RSEL = 0b00001000; /// $D016 Control register 2 /// - Bit#0-#2: XSCROLL Screen Soft Scroll Horizontal @@ -245,13 +245,13 @@ char* const VICII_CONTROL2 = (char*)0xd016; /// @see #VICII_CONTROL2 char* const D016 = (char*)0xd016; /// $D016 Control register #2 Bit#4: MCM Turn Multicolor Mode on/off -const char VICII_MCM = %00010000; +const char VICII_MCM = 0b00010000; /// $D016 Control register #2 Bit#3: CSEL Switch betweem 40 or 38 visible columns /// CSEL| Display window width | First X coo. | Last X coo. /// ----+--------------------------+--------------+------------ /// 0 | 38 characters/304 pixels | 31 ($1f) | 334 ($14e) /// 1 | 40 characters/320 pixels | 24 ($18) | 343 ($157) -const char VICII_CSEL = %00001000; +const char VICII_CSEL = 0b00001000; /// $D018 VIC-II base addresses /// - Bit#0: not used @@ -275,20 +275,20 @@ char* const IRQ_ENABLE = (char*)0xd01a; /// | | the VIC for the raster compare. The test for reaching the /// | | interrupt raster line is done in cycle 0 of every line (for line /// | | 0, in cycle 1). -const char IRQ_RASTER = %00000001; +const char IRQ_RASTER = 0b00000001; /// VICII IRQ Status/Enable Background Collision // @see #IRQ_ENABLE #IRQ_STATUS /// 1 | MBC| Collision of at least one sprite with the text/bitmap graphics /// | | (one sprite data sequencer outputs non-transparent pixel at the /// | | same time at which the graphics data sequencer outputs a /// | | foreground pixel) -const char IRQ_COLLISION_BG = %00000010; +const char IRQ_COLLISION_BG = 0b00000010; /// VICII IRQ Status/Enable Sprite Collision // @see #IRQ_ENABLE #IRQ_STATUS /// 2 | MMC| Collision of two or more sprites (two sprite data sequencers /// | | output a non-transparent pixel at the same time) -const char IRQ_COLLISION_SPRITE = %00000100; +const char IRQ_COLLISION_SPRITE = 0b00000100; /// VICII IRQ Status/Enable Lightpen // @see #IRQ_ENABLE #IRQ_STATUS /// 3 | LP | Negative edge on the LP input (lightpen)const char IRQ_RASTER = %00000001; -const char IRQ_LIGHTPEN = %00001000; +const char IRQ_LIGHTPEN = 0b00001000; diff --git a/src/main/kc/lib/c64-bitmap.c b/src/main/kc/lib/c64-bitmap.c index 87539bb8d..2886e8b9f 100644 --- a/src/main/kc/lib/c64-bitmap.c +++ b/src/main/kc/lib/c64-bitmap.c @@ -16,19 +16,19 @@ const char bitmap_plot_bit[256]; void bitmap_init(char* gfx, char* screen) { bitmap_gfx = gfx; bitmap_screen = screen; - char bits = $80; + char bits = 0x80; for(char x : 0..255) { bitmap_plot_bit[x] = bits; bits >>= 1; if(bits==0) { - bits = $80; + bits = 0x80; } } char* yoffs = gfx; for(char y : 0..255) { - bitmap_plot_ylo[y] = y&$7 | BYTE0(yoffs); + bitmap_plot_ylo[y] = y&0x7 | BYTE0(yoffs); bitmap_plot_yhi[y] = BYTE1(yoffs); - if((y&$7)==7) { + if((y&0x7)==7) { yoffs = yoffs + 40*8; } } @@ -46,13 +46,13 @@ void bitmap_clear(char bgcol, char fgcol) { // Plot a single dot in the bitmap void bitmap_plot(unsigned int x, char y) { char* plotter = (char*) MAKEWORD( bitmap_plot_yhi[y], bitmap_plot_ylo[y] ); - plotter += ( x & $fff8 ); + plotter += ( x & 0xfff8 ); *plotter |= bitmap_plot_bit[BYTE0(x)]; } void bitmap_unplot(unsigned int x, char y) { char* plotter = (char*) MAKEWORD( bitmap_plot_yhi[y], bitmap_plot_ylo[y] ); - plotter += ( x & $fff8 ); + plotter += ( x & 0xfff8 ); *plotter &= ~(bitmap_plot_bit[BYTE0(x)]); } diff --git a/src/main/kc/lib/c64-keyboard.c b/src/main/kc/lib/c64-keyboard.c index 8d9b98af2..726a264c7 100644 --- a/src/main/kc/lib/c64-keyboard.c +++ b/src/main/kc/lib/c64-keyboard.c @@ -25,25 +25,25 @@ const char keyboard_char_keycodes[] = { /*@*/KEY_AT, /*a*/KEY_A, /*b*/KEY_B, /*c*/KEY_C, /*d*/KEY_D, /*e*/KEY_E, /*f*/KEY_F, /*g*/KEY_G, /*h*/KEY_H, /*i*/KEY_I, /*j*/KEY_J, /*k*/KEY_K, /*l*/KEY_L, /*m*/KEY_M, /*n*/KEY_N, /*o*/KEY_O, /*p*/KEY_P, /*q*/KEY_Q, /*r*/KEY_R, /*s*/KEY_S, /*t*/KEY_T, /*u*/KEY_U, /*v*/KEY_V, /*w*/KEY_W, - /*x*/KEY_X, /*y*/KEY_Y, /*z*/KEY_Z, /*[*/$3f, /*£*/KEY_POUND, /*]*/$3f, /*^*/KEY_ARROW_UP, /*<-*/KEY_ARROW_LEFT, - /* */KEY_SPACE, /*!*/$3f, /*"*/$3f, /*#*/$3f, /*$*/$3f, /*%*/$3f, /*&*/$3f, /*´*/$3f, - /*(*/$3f, /*)*/$3f, /***/KEY_ASTERISK, /*+*/KEY_PLUS, /*,*/KEY_COMMA, /*-*/KEY_MINUS, /*.*/KEY_DOT, /*/*/KEY_SLASH, + /*x*/KEY_X, /*y*/KEY_Y, /*z*/KEY_Z, /*[*/0x3f, /*£*/KEY_POUND, /*]*/0x3f, /*^*/KEY_ARROW_UP, /*<-*/KEY_ARROW_LEFT, + /* */KEY_SPACE, /*!*/0x3f, /*"*/0x3f, /*#*/0x3f, /*$*/0x3f, /*%*/0x3f, /*&*/0x3f, /*´*/0x3f, + /*(*/0x3f, /*)*/0x3f, /***/KEY_ASTERISK, /*+*/KEY_PLUS, /*,*/KEY_COMMA, /*-*/KEY_MINUS, /*.*/KEY_DOT, /*/*/KEY_SLASH, /*0*/KEY_0, /*1*/KEY_1, /*2*/KEY_2, /*3*/KEY_3, /*4*/KEY_4, /*5*/KEY_5, /*6*/KEY_6, /*7*/KEY_7, - /*8*/KEY_8, /*9*/KEY_9, /*:*/KEY_COLON, /*;*/KEY_SEMICOLON, /*<*/$3f, /*=*/KEY_EQUALS, /*>*/$3f, /*?*/$3f + /*8*/KEY_8, /*9*/KEY_9, /*:*/KEY_COLON, /*;*/KEY_SEMICOLON, /*<*/0x3f, /*=*/KEY_EQUALS, /*>*/0x3f, /*?*/0x3f }; // Keyboard row bitmask as expected by CIA#1 Port A when reading a specific keyboard matrix row (rows are numbered 0-7) -char keyboard_matrix_row_bitmask[8] = { %11111110, %11111101, %11111011, %11110111, %11101111, %11011111, %10111111, %01111111 }; +char keyboard_matrix_row_bitmask[8] = { 0b11111110, 0b11111101, 0b11111011, 0b11110111, 0b11101111, 0b11011111, 0b10111111, 0b01111111 }; // Keyboard matrix column bitmasks for a specific keybooard matrix column when reading the keyboard. (columns are numbered 0-7) -char keyboard_matrix_col_bitmask[8] = { %00000001, %00000010, %00000100, %00001000, %00010000, %00100000, %01000000, %10000000 }; +char keyboard_matrix_col_bitmask[8] = { 0b00000001, 0b00000010, 0b00000100, 0b00001000, 0b00010000, 0b00100000, 0b01000000, 0b10000000 }; // Initialize keyboard reading by setting CIA#1 Data Direction Registers void keyboard_init() { // Keyboard Matrix Columns Write Mode - CIA1->PORT_A_DDR = $ff; + CIA1->PORT_A_DDR = 0xff; // Keyboard Matrix Columns Read Mode - CIA1->PORT_B_DDR = $00; + CIA1->PORT_B_DDR = 0x00; } // Check if any key is currently pressed on the keyboard matrix @@ -121,7 +121,7 @@ void keyboard_event_scan() { char event_type = row_scan&keyboard_matrix_col_bitmask[col]; if(event_type==0) { // Key released - keyboard_events[keyboard_events_size++] = keycode|$40; + keyboard_events[keyboard_events_size++] = keycode|0x40; } else { // Key pressed keyboard_events[keyboard_events_size++] = keycode; @@ -165,7 +165,7 @@ char keyboard_event_pressed(char keycode) { // The buffer is filled by keyboard_event_scan() char keyboard_event_get() { if(keyboard_events_size==0) { - return $ff; + return 0xff; } else { return keyboard_events[--keyboard_events_size]; } diff --git a/src/main/kc/lib/c64-print.c b/src/main/kc/lib/c64-print.c index a8d546c7d..1e564895c 100644 --- a/src/main/kc/lib/c64-print.c +++ b/src/main/kc/lib/c64-print.c @@ -1,7 +1,7 @@ #include #include -char* print_screen = (char*)$0400; +char* print_screen = (char*)0x0400; char* print_line_cursor = print_screen; char* print_char_cursor = print_line_cursor; @@ -41,7 +41,7 @@ void print_str_at(char* str, char* at) { // Print a newline void print_ln() { do { - print_line_cursor = print_line_cursor + $28; + print_line_cursor = print_line_cursor + 0x28; } while (print_line_cursor>4]); - print_char(print_hextab[b&$f]); + print_char(print_hextab[b&0xf]); } // Prints a char as HEX at a specific position on the screen @@ -176,7 +176,7 @@ inline void print_uchar_pos(char b, char row, char col) { void print_uchar_at(char b, char* at) { // Table of hexadecimal digits print_char_at(print_hextab[b>>4], at); - print_char_at(print_hextab[b&$f], at+1); + print_char_at(print_hextab[b&0xf], at+1); } // Print a single char diff --git a/src/main/kc/lib/c64.c b/src/main/kc/lib/c64.c index 86ba4593f..d3ec305ce 100644 --- a/src/main/kc/lib/c64.c +++ b/src/main/kc/lib/c64.c @@ -4,25 +4,25 @@ // Get the value to store into D018 to display a specific screen and charset/bitmap // Optimized for ASM from (char)((((unsigned int)screen&$3fff)/$40)|(((unsigned int)charset&$3fff)/$400)); inline char toD018(char* screen, char* gfx) { - return BYTE1(((unsigned int)screen&$3fff)*4)|(((BYTE1((unsigned int)gfx))/4)&$f); + return BYTE1(((unsigned int)screen&0x3fff)*4)|(((BYTE1((unsigned int)gfx))/4)&0xf); } // Get the value to store into DD00 (CIA 2 port A) to choose a specific VIC bank // Optimized for ASM from %00000011 ^ (char)((unsigned int)gfx/$4000) inline char toDd00(char* gfx) { - return %00000011 ^ (BYTE1((unsigned int)gfx))/$40; + return 0b00000011 ^ (BYTE1((unsigned int)gfx))/0x40; } // Get the sprite pointer for a sprite. // The sprite pointer is the index of the sprite within the graphics bank and equal to the sprite (char)(sprite_addr/64) // The sprite pointers are stored SCREEN+$3f8+sprite_id to set the pointer of each sprite inline char toSpritePtr(char* sprite) { - return (char)(((unsigned int)sprite)/$40); + return (char)(((unsigned int)sprite)/0x40); } // Select a specific VIC graphics bank by setting the CIA 2 port A ($dd00) as needed inline void vicSelectGfxBank(char* gfx) { - CIA2->PORT_A_DDR = %00000011; + CIA2->PORT_A_DDR = 0b00000011; CIA2->PORT_A = toDd00(gfx); } diff --git a/src/main/kc/lib/c64dtv.c b/src/main/kc/lib/c64dtv.c index 3434a012c..4d2336094 100644 --- a/src/main/kc/lib/c64dtv.c +++ b/src/main/kc/lib/c64dtv.c @@ -11,7 +11,7 @@ // The actual memory addressed will be $4000*cpuSegmentIdx void dtvSetCpuBankSegment1(char cpuBankIdx) { // Move CPU BANK 1 SEGMENT ($4000-$7fff) - char* cpuBank = (char*)$ff; + char* cpuBank = (char*)0xff; *cpuBank = cpuBankIdx; asm { // SAC $dd - A register points to 13 BANK 1 segment diff --git a/src/main/kc/lib/conio-atarixl.c b/src/main/kc/lib/conio-atarixl.c index 4533292cf..95ddb9798 100644 --- a/src/main/kc/lib/conio-atarixl.c +++ b/src/main/kc/lib/conio-atarixl.c @@ -233,8 +233,8 @@ inline unsigned char convertToScreenCode(unsigned char* v) { char rawmap[0x100] = kickasm {{ .var ht = Hashtable().put(0,64, 1,0, 2,32, 3,96) // the table for converting bit 6,7 into ora value .for(var i=0; i<256; i++) { - .var idx = (i & $60) / 32 - .var mask = i & $9f + .var idx = (i & 0x60) / 32 + .var mask = i & 0x9f .byte mask | ht.get(idx) } }}; diff --git a/src/main/kc/lib/cx16-veralib.c b/src/main/kc/lib/cx16-veralib.c index 96e4e6701..30eeebcd1 100644 --- a/src/main/kc/lib/cx16-veralib.c +++ b/src/main/kc/lib/cx16-veralib.c @@ -391,7 +391,7 @@ void vera_layer_set_tilebase_address(byte layer, dword tilebase_address) { dword vera_layer_get_tilebase_address(byte layer) { byte tilebase = *vera_layer_tilebase[layer]; dword address = tilebase; - address &= $FC; + address &= 0xFC; address <<= 8; address <<= 1; return address; diff --git a/src/main/kc/lib/division.c b/src/main/kc/lib/division.c index 0960bf04a..20233a092 100644 --- a/src/main/kc/lib/division.c +++ b/src/main/kc/lib/division.c @@ -23,7 +23,7 @@ char divr8u(char dividend, char divisor, char rem) { char quotient = 0; for( char i : 0..7) { rem = rem << 1; - if( (dividend & $80) != 0 ) { + if( (dividend & 0x80) != 0 ) { rem = rem | 1; } dividend = dividend << 1; @@ -57,7 +57,7 @@ unsigned int divr16u(unsigned int dividend, unsigned int divisor, unsigned int r unsigned int quotient = 0; for( char i : 0..15) { rem = rem << 1; - if( (BYTE1(dividend) & $80) != 0 ) { + if( (BYTE1(dividend) & 0x80) != 0 ) { rem = rem | 1; } dividend = dividend << 1; diff --git a/src/main/kc/lib/fastmultiply.c b/src/main/kc/lib/fastmultiply.c index 80ae97cb1..ab4efac71 100644 --- a/src/main/kc/lib/fastmultiply.c +++ b/src/main/kc/lib/fastmultiply.c @@ -6,13 +6,13 @@ // mulf_sqr tables will contain f(x)=int(x*x/4) and g(x) = f(x-255). // f(x) = >(( x * x )/4) -char __align($100) mulf_sqr1_hi[512]; +char __align(0x100) mulf_sqr1_hi[512]; // g(x) = >((( x - 255) * ( x - 255 ))/4) -char __align($100) mulf_sqr2_hi[512]; +char __align(0x100) mulf_sqr2_hi[512]; // Initialize the mulf_sqr multiplication tables with f(x)=int(x*x/4) void mulf_init() { @@ -33,7 +33,7 @@ void mulf_init() { // Fill mulf_sqr2 = g(x) = f(x-255) : If x-255<0 then g(x)=f(255-x) (because x*x = -x*-x) // g(0) = f(255), g(1) = f(254), ..., g(254) = f(1), g(255) = f(0), g(256) = f(1), ..., g(510) = f(255), g(511) = f(256) char x_255 = (char)-1; //Start with g(0)=f(255) - char dir = $ff; // Decrease or increase x_255 - initially we decrease + char dir = 0xff; // Decrease or increase x_255 - initially we decrease char* sqr2_hi = mulf_sqr2_hi; for(char* sqr2_lo = mulf_sqr2_lo; sqr2_lo!=mulf_sqr2_lo+511; sqr2_lo++) { *sqr2_lo = mulf_sqr1_lo[x_255]; @@ -50,7 +50,7 @@ void mulf_init() { // Prepare for fast multiply with an unsigned char to a unsigned int result void mulf8u_prepare(char a) { - char* const memA = (char*)$fd; + char* const memA = (char*)0xfd; *memA = a; asm { lda memA @@ -65,8 +65,8 @@ void mulf8u_prepare(char a) { // Calculate fast multiply with a prepared unsigned char to a unsigned int result // The prepared number is set by calling mulf8u_prepare(char a) unsigned int mulf8u_prepared(char b) { - char* const resL = (char*)$fe; - char* const memB = (char*)$ff; + char* const resL = (char*)0xfe; + char* const memB = (char*)0xff; *memB = b; asm { ldx memB @@ -99,7 +99,7 @@ inline void mulf8s_prepare(signed char a) { // Calculate fast multiply with a prepared unsigned char to a unsigned int result // The prepared number is set by calling mulf8s_prepare(char a) signed int mulf8s_prepared(signed char b) { - signed char* const memA = (signed char*)$fd; + signed char* const memA = (signed char*)0xfd; unsigned int m = mulf8u_prepared((char) b); if(*memA<0) { BYTE1(m) = BYTE1(m)-(char)b; @@ -119,9 +119,9 @@ signed int mulf8s(signed char a, signed char b) { // Fast multiply two unsigned ints to a double unsigned int result // Done in assembler to utilize fast addition A+X unsigned long mulf16u(unsigned int a, unsigned int b) { - unsigned int* const memA = (unsigned int*)$f8; - unsigned int* const memB = (unsigned int*)$fa; - unsigned long* const memR = (unsigned long*)$fc; + unsigned int* const memA = (unsigned int*)0xf8; + unsigned int* const memB = (unsigned int*)0xfa; + unsigned long* const memR = (unsigned long*)0xfc; *memA = a; *memB = b; asm { diff --git a/src/main/kc/lib/mega65-memorymapper.c b/src/main/kc/lib/mega65-memorymapper.c index 1b07432d4..89dade60d 100644 --- a/src/main/kc/lib/mega65-memorymapper.c +++ b/src/main/kc/lib/mega65-memorymapper.c @@ -59,7 +59,7 @@ void memoryRemapBlock(unsigned char blockPage, unsigned int memoryPage) { // Find the page offset (the number of pages to offset the block) unsigned int pageOffset = memoryPage-blockPage; // Which block is being remapped? (0-7) - char block = blockPage / $20; + char block = blockPage / 0x20; char blockBits = 1<PORT_A_DDR = %00000011; + CIA2->PORT_A_DDR = 0b00000011; CIA2->PORT_A = toDd00(gfx); } \ No newline at end of file diff --git a/src/main/kc/lib/sine.c b/src/main/kc/lib/sine.c index 5066ac57e..fdccfc3c0 100644 --- a/src/main/kc/lib/sine.c +++ b/src/main/kc/lib/sine.c @@ -9,18 +9,18 @@ #include // PI*2 in u[4.28] format -const unsigned long PI2_u4f28 = $6487ed51; +const unsigned long PI2_u4f28 = 0x6487ed51; // PI in u[4.28] format -const unsigned long PI_u4f28 = $3243f6a9; +const unsigned long PI_u4f28 = 0x3243f6a9; // PI/2 in u[4.28] format -const unsigned long PI_HALF_u4f28 = $1921FB54; +const unsigned long PI_HALF_u4f28 = 0x1921FB54; // PI*2 in u[4.12] format -const unsigned int PI2_u4f12 = $6488; +const unsigned int PI2_u4f12 = 0x6488; // PI in u[4.12] format -const unsigned int PI_u4f12 = $3244; +const unsigned int PI_u4f12 = 0x3244; // PI/2 in u[4.12] format -const unsigned int PI_HALF_u4f12 = $1922; +const unsigned int PI_HALF_u4f12 = 0x1922; // Generate signed (large) unsigned int sine table - on the full -$7fff - $7fff range // sintab - the table to generate into @@ -83,7 +83,7 @@ signed int sin16s(unsigned long x) { unsigned int x1 = WORD1(x<<3); // u[1.15] unsigned int x2 = mulu16_sel(x1, x1, 0); // u[2.14] x^2 unsigned int x3 = mulu16_sel(x2, x1, 1); // u[2.14] x^3 - unsigned int x3_6 = mulu16_sel(x3, $10000/6, 1); // u[1.15] x^3/6; + unsigned int x3_6 = mulu16_sel(x3, 0x10000/6, 1); // u[1.15] x^3/6; unsigned int usinx = x1 - x3_6; // u[1.15] x - x^3/6 unsigned int x4 = mulu16_sel(x3, x1, 0); // u[3.13] x^4 unsigned int x5 = mulu16_sel(x4, x1, 0); // u[4.12] x^5 @@ -113,7 +113,7 @@ signed char sin8s(unsigned int x) { char x1 = BYTE1(x<<3); // u[1.7] char x2 = mulu8_sel(x1, x1, 0); // u[2.6] x^2 char x3 = mulu8_sel(x2, x1, 1); // u[2.6] x^3 - const char DIV_6 = $2b; // u[0.7] - $2a.aa rounded to $2b + const char DIV_6 = 0x2b; // u[0.7] - $2a.aa rounded to $2b char x3_6 = mulu8_sel(x3, DIV_6, 1); // u[1.7] x^3/6; char usinx = x1 - x3_6; // u[1.7] x - x^3/6 char x4 = mulu8_sel(x3, x1, 0); // u[3.5] x^4 diff --git a/src/test/ref/bitmap-line-anim-1.asm b/src/test/ref/bitmap-line-anim-1.asm index d7dcad051..dc8fc4d08 100644 --- a/src/test/ref/bitmap-line-anim-1.asm +++ b/src/test/ref/bitmap-line-anim-1.asm @@ -94,20 +94,20 @@ bitmap_init: { sta.z yoffs+1 ldx #0 __b3: - // y&$7 + // y&0x7 lda #7 sax.z __7 // BYTE0(yoffs) lda.z yoffs - // y&$7 | BYTE0(yoffs) + // y&0x7 | BYTE0(yoffs) ora.z __7 - // bitmap_plot_ylo[y] = y&$7 | BYTE0(yoffs) + // bitmap_plot_ylo[y] = y&0x7 | BYTE0(yoffs) sta bitmap_plot_ylo,x // BYTE1(yoffs) lda.z yoffs+1 // bitmap_plot_yhi[y] = BYTE1(yoffs) sta bitmap_plot_yhi,x - // if((y&$7)==7) + // if((y&0x7)==7) lda #7 cmp.z __7 bne __b4 @@ -515,14 +515,14 @@ bitmap_plot: { sta.z plotter+1 lda bitmap_plot_ylo,x sta.z plotter - // x & $fff8 + // x & 0xfff8 lda.z x and #<$fff8 sta.z __1 lda.z x+1 and #>$fff8 sta.z __1+1 - // plotter += ( x & $fff8 ) + // plotter += ( x & 0xfff8 ) clc lda.z plotter adc.z __1 diff --git a/src/test/ref/bitmap-line-anim-1.log b/src/test/ref/bitmap-line-anim-1.log index 7e7c5d9c8..f4365212e 100644 --- a/src/test/ref/bitmap-line-anim-1.log +++ b/src/test/ref/bitmap-line-anim-1.log @@ -3584,17 +3584,17 @@ bitmap_init: { // [22] phi bitmap_init::y#2 = bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy // bitmap_init::@3 __b3: - // y&$7 + // y&0x7 // [23] bitmap_init::$7 = bitmap_init::y#2 & 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax.z __7 // BYTE0(yoffs) // [24] bitmap_init::$4 = byte0 bitmap_init::yoffs#2 -- vbuaa=_byte0_pbuz1 lda.z yoffs - // y&$7 | BYTE0(yoffs) + // y&0x7 | BYTE0(yoffs) // [25] bitmap_init::$5 = bitmap_init::$7 | bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora.z __7 - // bitmap_plot_ylo[y] = y&$7 | BYTE0(yoffs) + // bitmap_plot_ylo[y] = y&0x7 | BYTE0(yoffs) // [26] bitmap_plot_ylo[bitmap_init::y#2] = bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x // BYTE1(yoffs) @@ -3603,7 +3603,7 @@ bitmap_init: { // bitmap_plot_yhi[y] = BYTE1(yoffs) // [28] bitmap_plot_yhi[bitmap_init::y#2] = bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x - // if((y&$7)==7) + // if((y&0x7)==7) // [29] if(bitmap_init::$7!=7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp.z __7 @@ -4194,7 +4194,7 @@ bitmap_plot: { sta.z plotter+1 lda bitmap_plot_ylo,x sta.z plotter - // x & $fff8 + // x & 0xfff8 // [119] bitmap_plot::$1 = bitmap_plot::x#4 & $fff8 -- vwuz1=vwuz2_band_vwuc1 lda.z x and #<$fff8 @@ -4202,7 +4202,7 @@ bitmap_plot: { lda.z x+1 and #>$fff8 sta.z __1+1 - // plotter += ( x & $fff8 ) + // plotter += ( x & 0xfff8 ) // [120] bitmap_plot::plotter#1 = (char *)bitmap_plot::plotter#0 + bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 clc lda.z plotter diff --git a/src/test/ref/bitmap-line-anim-2.asm b/src/test/ref/bitmap-line-anim-2.asm index 64c3060b0..64a38a93f 100644 --- a/src/test/ref/bitmap-line-anim-2.asm +++ b/src/test/ref/bitmap-line-anim-2.asm @@ -103,20 +103,20 @@ bitmap_init: { sta.z yoffs+1 ldx #0 __b3: - // y&$7 + // y&0x7 lda #7 sax.z __7 // BYTE0(yoffs) lda.z yoffs - // y&$7 | BYTE0(yoffs) + // y&0x7 | BYTE0(yoffs) ora.z __7 - // bitmap_plot_ylo[y] = y&$7 | BYTE0(yoffs) + // bitmap_plot_ylo[y] = y&0x7 | BYTE0(yoffs) sta bitmap_plot_ylo,x // BYTE1(yoffs) lda.z yoffs+1 // bitmap_plot_yhi[y] = BYTE1(yoffs) sta bitmap_plot_yhi,x - // if((y&$7)==7) + // if((y&0x7)==7) lda #7 cmp.z __7 bne __b4 @@ -496,14 +496,14 @@ bitmap_plot: { sta.z plotter+1 lda bitmap_plot_ylo,x sta.z plotter - // x & $fff8 + // x & 0xfff8 lda.z x and #<$fff8 sta.z __1 lda.z x+1 and #>$fff8 sta.z __1+1 - // plotter += ( x & $fff8 ) + // plotter += ( x & 0xfff8 ) clc lda.z plotter adc.z __1 diff --git a/src/test/ref/bitmap-line-anim-2.log b/src/test/ref/bitmap-line-anim-2.log index c3a6c0e24..adfe1a679 100644 --- a/src/test/ref/bitmap-line-anim-2.log +++ b/src/test/ref/bitmap-line-anim-2.log @@ -3545,17 +3545,17 @@ bitmap_init: { // [23] phi bitmap_init::y#2 = bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy // bitmap_init::@3 __b3: - // y&$7 + // y&0x7 // [24] bitmap_init::$7 = bitmap_init::y#2 & 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax.z __7 // BYTE0(yoffs) // [25] bitmap_init::$4 = byte0 bitmap_init::yoffs#2 -- vbuaa=_byte0_pbuz1 lda.z yoffs - // y&$7 | BYTE0(yoffs) + // y&0x7 | BYTE0(yoffs) // [26] bitmap_init::$5 = bitmap_init::$7 | bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora.z __7 - // bitmap_plot_ylo[y] = y&$7 | BYTE0(yoffs) + // bitmap_plot_ylo[y] = y&0x7 | BYTE0(yoffs) // [27] bitmap_plot_ylo[bitmap_init::y#2] = bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x // BYTE1(yoffs) @@ -3564,7 +3564,7 @@ bitmap_init: { // bitmap_plot_yhi[y] = BYTE1(yoffs) // [29] bitmap_plot_yhi[bitmap_init::y#2] = bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x - // if((y&$7)==7) + // if((y&0x7)==7) // [30] if(bitmap_init::$7!=7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp.z __7 @@ -4115,7 +4115,7 @@ bitmap_plot: { sta.z plotter+1 lda bitmap_plot_ylo,x sta.z plotter - // x & $fff8 + // x & 0xfff8 // [114] bitmap_plot::$1 = bitmap_plot::x#4 & $fff8 -- vwuz1=vwuz2_band_vwuc1 lda.z x and #<$fff8 @@ -4123,7 +4123,7 @@ bitmap_plot: { lda.z x+1 and #>$fff8 sta.z __1+1 - // plotter += ( x & $fff8 ) + // plotter += ( x & 0xfff8 ) // [115] bitmap_plot::plotter#1 = (char *)bitmap_plot::plotter#0 + bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 clc lda.z plotter diff --git a/src/test/ref/bitmap-plot-0.asm b/src/test/ref/bitmap-plot-0.asm index 34bb5ce37..c90bd9eeb 100644 --- a/src/test/ref/bitmap-plot-0.asm +++ b/src/test/ref/bitmap-plot-0.asm @@ -223,20 +223,20 @@ bitmap_init: { sta.z yoffs+1 ldx #0 __b3: - // y&$7 + // y&0x7 lda #7 sax.z __7 // BYTE0(yoffs) lda.z yoffs - // y&$7 | BYTE0(yoffs) + // y&0x7 | BYTE0(yoffs) ora.z __7 - // bitmap_plot_ylo[y] = y&$7 | BYTE0(yoffs) + // bitmap_plot_ylo[y] = y&0x7 | BYTE0(yoffs) sta bitmap_plot_ylo,x // BYTE1(yoffs) lda.z yoffs+1 // bitmap_plot_yhi[y] = BYTE1(yoffs) sta bitmap_plot_yhi,x - // if((y&$7)==7) + // if((y&0x7)==7) lda #7 cmp.z __7 bne __b4 @@ -336,14 +336,14 @@ bitmap_plot: { sta.z plotter+1 lda bitmap_plot_ylo,x sta.z plotter - // x & $fff8 + // x & 0xfff8 lda.z x and #<$fff8 sta.z __1 lda.z x+1 and #>$fff8 sta.z __1+1 - // plotter += ( x & $fff8 ) + // plotter += ( x & 0xfff8 ) clc lda.z plotter adc.z __1 diff --git a/src/test/ref/bitmap-plot-0.log b/src/test/ref/bitmap-plot-0.log index d19b09e02..c26b8b9fc 100644 --- a/src/test/ref/bitmap-plot-0.log +++ b/src/test/ref/bitmap-plot-0.log @@ -2790,17 +2790,17 @@ bitmap_init: { // [43] phi bitmap_init::y#2 = bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy // bitmap_init::@3 __b3: - // y&$7 + // y&0x7 // [44] bitmap_init::$7 = bitmap_init::y#2 & 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax.z __7 // BYTE0(yoffs) // [45] bitmap_init::$4 = byte0 bitmap_init::yoffs#2 -- vbuaa=_byte0_pbuz1 lda.z yoffs - // y&$7 | BYTE0(yoffs) + // y&0x7 | BYTE0(yoffs) // [46] bitmap_init::$5 = bitmap_init::$7 | bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora.z __7 - // bitmap_plot_ylo[y] = y&$7 | BYTE0(yoffs) + // bitmap_plot_ylo[y] = y&0x7 | BYTE0(yoffs) // [47] bitmap_plot_ylo[bitmap_init::y#2] = bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x // BYTE1(yoffs) @@ -2809,7 +2809,7 @@ bitmap_init: { // bitmap_plot_yhi[y] = BYTE1(yoffs) // [49] bitmap_plot_yhi[bitmap_init::y#2] = bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x - // if((y&$7)==7) + // if((y&0x7)==7) // [50] if(bitmap_init::$7!=7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp.z __7 @@ -2948,7 +2948,7 @@ bitmap_plot: { sta.z plotter+1 lda bitmap_plot_ylo,x sta.z plotter - // x & $fff8 + // x & 0xfff8 // [72] bitmap_plot::$1 = bitmap_plot::x#0 & $fff8 -- vwuz1=vwuz2_band_vwuc1 lda.z x and #<$fff8 @@ -2956,7 +2956,7 @@ bitmap_plot: { lda.z x+1 and #>$fff8 sta.z __1+1 - // plotter += ( x & $fff8 ) + // plotter += ( x & 0xfff8 ) // [73] bitmap_plot::plotter#1 = (char *)bitmap_plot::plotter#0 + bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 clc lda.z plotter diff --git a/src/test/ref/bitmap-plot-3.asm b/src/test/ref/bitmap-plot-3.asm index 0cd9c18ad..2646e2342 100644 --- a/src/test/ref/bitmap-plot-3.asm +++ b/src/test/ref/bitmap-plot-3.asm @@ -137,20 +137,20 @@ bitmap_init: { sta.z yoffs+1 ldx #0 __b3: - // y&$7 + // y&0x7 lda #7 sax.z __7 // BYTE0(yoffs) lda.z yoffs - // y&$7 | BYTE0(yoffs) + // y&0x7 | BYTE0(yoffs) ora.z __7 - // bitmap_plot_ylo[y] = y&$7 | BYTE0(yoffs) + // bitmap_plot_ylo[y] = y&0x7 | BYTE0(yoffs) sta bitmap_plot_ylo,x // BYTE1(yoffs) lda.z yoffs+1 // bitmap_plot_yhi[y] = BYTE1(yoffs) sta bitmap_plot_yhi,x - // if((y&$7)==7) + // if((y&0x7)==7) lda #7 cmp.z __7 bne __b4 @@ -522,14 +522,14 @@ bitmap_plot: { sta.z plotter+1 lda bitmap_plot_ylo,x sta.z plotter - // x & $fff8 + // x & 0xfff8 lda.z x and #<$fff8 sta.z __1 lda.z x+1 and #>$fff8 sta.z __1+1 - // plotter += ( x & $fff8 ) + // plotter += ( x & 0xfff8 ) clc lda.z plotter adc.z __1 diff --git a/src/test/ref/bitmap-plot-3.log b/src/test/ref/bitmap-plot-3.log index 5051a342b..ea97f7a80 100644 --- a/src/test/ref/bitmap-plot-3.log +++ b/src/test/ref/bitmap-plot-3.log @@ -3853,17 +3853,17 @@ bitmap_init: { // [28] phi bitmap_init::y#2 = bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy // bitmap_init::@3 __b3: - // y&$7 + // y&0x7 // [29] bitmap_init::$7 = bitmap_init::y#2 & 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax.z __7 // BYTE0(yoffs) // [30] bitmap_init::$4 = byte0 bitmap_init::yoffs#2 -- vbuaa=_byte0_pbuz1 lda.z yoffs - // y&$7 | BYTE0(yoffs) + // y&0x7 | BYTE0(yoffs) // [31] bitmap_init::$5 = bitmap_init::$7 | bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora.z __7 - // bitmap_plot_ylo[y] = y&$7 | BYTE0(yoffs) + // bitmap_plot_ylo[y] = y&0x7 | BYTE0(yoffs) // [32] bitmap_plot_ylo[bitmap_init::y#2] = bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x // BYTE1(yoffs) @@ -3872,7 +3872,7 @@ bitmap_init: { // bitmap_plot_yhi[y] = BYTE1(yoffs) // [34] bitmap_plot_yhi[bitmap_init::y#2] = bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x - // if((y&$7)==7) + // if((y&0x7)==7) // [35] if(bitmap_init::$7!=7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp.z __7 @@ -4410,7 +4410,7 @@ bitmap_plot: { sta.z plotter+1 lda bitmap_plot_ylo,x sta.z plotter - // x & $fff8 + // x & 0xfff8 // [122] bitmap_plot::$1 = bitmap_plot::x#4 & $fff8 -- vwuz1=vwuz2_band_vwuc1 lda.z x and #<$fff8 @@ -4418,7 +4418,7 @@ bitmap_plot: { lda.z x+1 and #>$fff8 sta.z __1+1 - // plotter += ( x & $fff8 ) + // plotter += ( x & 0xfff8 ) // [123] bitmap_plot::plotter#1 = (char *)bitmap_plot::plotter#0 + bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 clc lda.z plotter diff --git a/src/test/ref/c-types.asm b/src/test/ref/c-types.asm index 4b036c89a..b65d08d90 100644 --- a/src/test/ref/c-types.asm +++ b/src/test/ref/c-types.asm @@ -298,10 +298,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } @@ -337,7 +337,7 @@ print_schar: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor diff --git a/src/test/ref/c-types.log b/src/test/ref/c-types.log index cdea0bfb0..c29c0c4a7 100644 --- a/src/test/ref/c-types.log +++ b/src/test/ref/c-types.log @@ -3978,11 +3978,11 @@ print_uchar: { // [95] phi print_char::ch#17 = print_char::ch#7 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [91] print_uchar::$2 = print_uchar::b#5 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [92] print_char::ch#8 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [93] call print_char @@ -4049,7 +4049,7 @@ print_ln: { // [106] phi print_line_cursor#21 = print_line_cursor#41 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [107] print_line_cursor#0 = print_line_cursor#21 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc diff --git a/src/test/ref/cia-timer-cyclecount.asm b/src/test/ref/cia-timer-cyclecount.asm index 6d48258c3..e71c51e48 100644 --- a/src/test/ref/cia-timer-cyclecount.asm +++ b/src/test/ref/cia-timer-cyclecount.asm @@ -180,11 +180,11 @@ print_uchar_at: { sta.z print_char_at.at+1 // Table of hexadecimal digits jsr print_char_at - // b&$f + // b&0xf lda #$f and.z b tay - // print_char_at(print_hextab[b&$f], at+1) + // print_char_at(print_hextab[b&0xf], at+1) clc lda.z at adc #1 diff --git a/src/test/ref/cia-timer-cyclecount.log b/src/test/ref/cia-timer-cyclecount.log index d0f1acec5..0147de648 100644 --- a/src/test/ref/cia-timer-cyclecount.log +++ b/src/test/ref/cia-timer-cyclecount.log @@ -1313,12 +1313,12 @@ print_uchar_at: { // [43] phi print_char_at::ch#2 = print_char_at::ch#0 [phi:print_uchar_at->print_char_at#1] -- register_copy jsr print_char_at // print_uchar_at::@1 - // b&$f + // b&0xf // [38] print_uchar_at::$2 = print_uchar_at::b#2 & $f -- vbuyy=vbuz1_band_vbuc1 lda #$f and.z b tay - // print_char_at(print_hextab[b&$f], at+1) + // print_char_at(print_hextab[b&0xf], at+1) // [39] print_char_at::at#1 = print_uchar_at::at#2 + 1 -- pbuz1=pbuz2_plus_1 clc lda.z at diff --git a/src/test/ref/cia-timer-simple.asm b/src/test/ref/cia-timer-simple.asm index a24d35fb4..5e1eaa910 100644 --- a/src/test/ref/cia-timer-simple.asm +++ b/src/test/ref/cia-timer-simple.asm @@ -157,11 +157,11 @@ print_uchar_at: { sta.z print_char_at.at+1 // Table of hexadecimal digits jsr print_char_at - // b&$f + // b&0xf lda #$f and.z b tay - // print_char_at(print_hextab[b&$f], at+1) + // print_char_at(print_hextab[b&0xf], at+1) clc lda.z at adc #1 diff --git a/src/test/ref/cia-timer-simple.log b/src/test/ref/cia-timer-simple.log index eff475044..a6c9f35d4 100644 --- a/src/test/ref/cia-timer-simple.log +++ b/src/test/ref/cia-timer-simple.log @@ -1227,12 +1227,12 @@ print_uchar_at: { // [40] phi print_char_at::ch#2 = print_char_at::ch#0 [phi:print_uchar_at->print_char_at#1] -- register_copy jsr print_char_at // print_uchar_at::@1 - // b&$f + // b&0xf // [35] print_uchar_at::$2 = print_uchar_at::b#2 & $f -- vbuyy=vbuz1_band_vbuc1 lda #$f and.z b tay - // print_char_at(print_hextab[b&$f], at+1) + // print_char_at(print_hextab[b&0xf], at+1) // [36] print_char_at::at#1 = print_uchar_at::at#2 + 1 -- pbuz1=pbuz2_plus_1 clc lda.z at diff --git a/src/test/ref/constants.asm b/src/test/ref/constants.asm index e68d47bb2..6d36ee6a2 100644 --- a/src/test/ref/constants.asm +++ b/src/test/ref/constants.asm @@ -297,7 +297,7 @@ print_str: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor diff --git a/src/test/ref/constants.log b/src/test/ref/constants.log index b1c1bb33f..2012d6e38 100644 --- a/src/test/ref/constants.log +++ b/src/test/ref/constants.log @@ -2892,7 +2892,7 @@ print_ln: { // [69] phi print_line_cursor#25 = print_line_cursor#49 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [70] print_line_cursor#0 = print_line_cursor#25 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc diff --git a/src/test/ref/ducks-total.asm b/src/test/ref/ducks-total.asm index 7e8118595..cb964a186 100644 --- a/src/test/ref/ducks-total.asm +++ b/src/test/ref/ducks-total.asm @@ -1917,11 +1917,11 @@ divr8u: { __b1: // rem = rem << 1 asl.z rem - // dividend & $80 + // dividend & 0x80 lda #$80 and.z dividend sta.z __1 - // if( (dividend & $80) != 0 ) + // if( (dividend & 0x80) != 0 ) beq __b2 // rem = rem | 1 lda #1 diff --git a/src/test/ref/ducks-total.log b/src/test/ref/ducks-total.log index bc1ca64e0..e520945b5 100644 --- a/src/test/ref/ducks-total.log +++ b/src/test/ref/ducks-total.log @@ -16613,12 +16613,12 @@ divr8u: { // rem = rem << 1 // [458] divr8u::rem#0 = divr8u::rem#5 << 1 -- vbuz1=vbuz1_rol_1 asl.z rem - // dividend & $80 + // dividend & 0x80 // [459] divr8u::$1 = divr8u::dividend#3 & $80 -- vbuz1=vbuz2_band_vbuc1 lda #$80 and.z dividend sta.z __1 - // if( (dividend & $80) != 0 ) + // if( (dividend & 0x80) != 0 ) // [460] if(divr8u::$1==0) goto divr8u::@2 -- vbuz1_eq_0_then_la1 beq __b2 // divr8u::@4 diff --git a/src/test/ref/euclid-3.asm b/src/test/ref/euclid-3.asm index 0fe3699e1..079536480 100644 --- a/src/test/ref/euclid-3.asm +++ b/src/test/ref/euclid-3.asm @@ -169,10 +169,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } @@ -223,7 +223,7 @@ euclid: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor diff --git a/src/test/ref/euclid-3.log b/src/test/ref/euclid-3.log index 1fad1e5a5..5cc59ca5e 100644 --- a/src/test/ref/euclid-3.log +++ b/src/test/ref/euclid-3.log @@ -2155,11 +2155,11 @@ print_uchar: { // [50] phi print_char::ch#4 = print_char::ch#0 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [46] print_uchar::$2 = print_uchar::b#3 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [47] print_char::ch#1 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [48] call print_char @@ -2240,7 +2240,7 @@ print_ln: { // [62] phi print_line_cursor#17 = print_line_cursor#35 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [63] print_line_cursor#0 = print_line_cursor#17 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc diff --git a/src/test/ref/examples/c64/3d/perspective.asm b/src/test/ref/examples/c64/3d/perspective.asm index 5f1785f5e..2f4874c12 100644 --- a/src/test/ref/examples/c64/3d/perspective.asm +++ b/src/test/ref/examples/c64/3d/perspective.asm @@ -350,10 +350,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } @@ -366,7 +366,7 @@ print_ln: { lda #>print_screen sta.z print_line_cursor+1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor diff --git a/src/test/ref/examples/c64/3d/perspective.log b/src/test/ref/examples/c64/3d/perspective.log index 75d6e8d72..81d0003bf 100644 --- a/src/test/ref/examples/c64/3d/perspective.log +++ b/src/test/ref/examples/c64/3d/perspective.log @@ -3271,11 +3271,11 @@ print_uchar: { // [107] phi print_char::ch#5 = print_char::ch#3 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [98] print_uchar::$2 = print_uchar::b#3 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [99] print_char::ch#4 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [100] call print_char @@ -3301,7 +3301,7 @@ print_ln: { // [103] phi print_line_cursor#12 = print_line_cursor#0 [phi:print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [104] print_line_cursor#0 = print_line_cursor#12 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc diff --git a/src/test/ref/examples/c64/bresenham/bitmap-bresenham.asm b/src/test/ref/examples/c64/bresenham/bitmap-bresenham.asm index 6d81d0d32..7e0c37467 100644 --- a/src/test/ref/examples/c64/bresenham/bitmap-bresenham.asm +++ b/src/test/ref/examples/c64/bresenham/bitmap-bresenham.asm @@ -90,20 +90,20 @@ bitmap_init: { sta.z yoffs+1 ldx #0 __b3: - // y&$7 + // y&0x7 lda #7 sax.z __7 // BYTE0(yoffs) lda.z yoffs - // y&$7 | BYTE0(yoffs) + // y&0x7 | BYTE0(yoffs) ora.z __7 - // bitmap_plot_ylo[y] = y&$7 | BYTE0(yoffs) + // bitmap_plot_ylo[y] = y&0x7 | BYTE0(yoffs) sta bitmap_plot_ylo,x // BYTE1(yoffs) lda.z yoffs+1 // bitmap_plot_yhi[y] = BYTE1(yoffs) sta bitmap_plot_yhi,x - // if((y&$7)==7) + // if((y&0x7)==7) lda #7 cmp.z __7 bne __b4 @@ -538,14 +538,14 @@ bitmap_plot: { sta.z plotter+1 lda bitmap_plot_ylo,x sta.z plotter - // x & $fff8 + // x & 0xfff8 lda.z x and #<$fff8 sta.z __1 lda.z x+1 and #>$fff8 sta.z __1+1 - // plotter += ( x & $fff8 ) + // plotter += ( x & 0xfff8 ) clc lda.z plotter adc.z __1 diff --git a/src/test/ref/examples/c64/bresenham/bitmap-bresenham.log b/src/test/ref/examples/c64/bresenham/bitmap-bresenham.log index af33bc94e..c09b1f0cf 100644 --- a/src/test/ref/examples/c64/bresenham/bitmap-bresenham.log +++ b/src/test/ref/examples/c64/bresenham/bitmap-bresenham.log @@ -3672,17 +3672,17 @@ bitmap_init: { // [20] phi bitmap_init::y#2 = bitmap_init::y#1 [phi:bitmap_init::@4->bitmap_init::@3#1] -- register_copy // bitmap_init::@3 __b3: - // y&$7 + // y&0x7 // [21] bitmap_init::$7 = bitmap_init::y#2 & 7 -- vbuz1=vbuxx_band_vbuc1 lda #7 sax.z __7 // BYTE0(yoffs) // [22] bitmap_init::$4 = byte0 bitmap_init::yoffs#2 -- vbuaa=_byte0_pbuz1 lda.z yoffs - // y&$7 | BYTE0(yoffs) + // y&0x7 | BYTE0(yoffs) // [23] bitmap_init::$5 = bitmap_init::$7 | bitmap_init::$4 -- vbuaa=vbuz1_bor_vbuaa ora.z __7 - // bitmap_plot_ylo[y] = y&$7 | BYTE0(yoffs) + // bitmap_plot_ylo[y] = y&0x7 | BYTE0(yoffs) // [24] bitmap_plot_ylo[bitmap_init::y#2] = bitmap_init::$5 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_ylo,x // BYTE1(yoffs) @@ -3691,7 +3691,7 @@ bitmap_init: { // bitmap_plot_yhi[y] = BYTE1(yoffs) // [26] bitmap_plot_yhi[bitmap_init::y#2] = bitmap_init::$6 -- pbuc1_derefidx_vbuxx=vbuaa sta bitmap_plot_yhi,x - // if((y&$7)==7) + // if((y&0x7)==7) // [27] if(bitmap_init::$7!=7) goto bitmap_init::@4 -- vbuz1_neq_vbuc1_then_la1 lda #7 cmp.z __7 @@ -4321,7 +4321,7 @@ bitmap_plot: { sta.z plotter+1 lda bitmap_plot_ylo,x sta.z plotter - // x & $fff8 + // x & 0xfff8 // [130] bitmap_plot::$1 = bitmap_plot::x#4 & $fff8 -- vwuz1=vwuz2_band_vwuc1 lda.z x and #<$fff8 @@ -4329,7 +4329,7 @@ bitmap_plot: { lda.z x+1 and #>$fff8 sta.z __1+1 - // plotter += ( x & $fff8 ) + // plotter += ( x & 0xfff8 ) // [131] bitmap_plot::plotter#1 = (char *)bitmap_plot::plotter#0 + bitmap_plot::$1 -- pbuz1=pbuz1_plus_vwuz2 clc lda.z plotter diff --git a/src/test/ref/examples/c64/fastmultiply/fastmultiply8.asm b/src/test/ref/examples/c64/fastmultiply/fastmultiply8.asm index f54a3613a..3a9d03be3 100644 --- a/src/test/ref/examples/c64/fastmultiply/fastmultiply8.asm +++ b/src/test/ref/examples/c64/fastmultiply/fastmultiply8.asm @@ -258,11 +258,11 @@ print_uchar_at: { ldx print_hextab,y // Table of hexadecimal digits jsr print_char_at - // b&$f + // b&0xf lda #$f and.z b tay - // print_char_at(print_hextab[b&$f], at+1) + // print_char_at(print_hextab[b&0xf], at+1) inc.z print_char_at.at bne !+ inc.z print_char_at.at+1 diff --git a/src/test/ref/examples/c64/fastmultiply/fastmultiply8.log b/src/test/ref/examples/c64/fastmultiply/fastmultiply8.log index 6bb624ab9..1f429c505 100644 --- a/src/test/ref/examples/c64/fastmultiply/fastmultiply8.log +++ b/src/test/ref/examples/c64/fastmultiply/fastmultiply8.log @@ -2444,12 +2444,12 @@ print_uchar_at: { // [65] phi print_char_at::ch#4 = print_char_at::ch#2 [phi:print_uchar_at->print_char_at#1] -- register_copy jsr print_char_at // print_uchar_at::@1 - // b&$f + // b&0xf // [72] print_uchar_at::$2 = print_uchar_at::b#0 & $f -- vbuyy=vbuz1_band_vbuc1 lda #$f and.z b tay - // print_char_at(print_hextab[b&$f], at+1) + // print_char_at(print_hextab[b&0xf], at+1) // [73] print_char_at::at#3 = print_uchar_at::at#0 + 1 -- pbuz1=pbuz1_plus_1 inc.z print_char_at.at bne !+ diff --git a/src/test/ref/examples/mega65/memorymap-test.asm b/src/test/ref/examples/mega65/memorymap-test.asm index b7b130bac..af809aa3a 100644 --- a/src/test/ref/examples/mega65/memorymap-test.asm +++ b/src/test/ref/examples/mega65/memorymap-test.asm @@ -141,7 +141,7 @@ memoryRemapBlock: { lda #>$100 sbc #0 sta.z pageOffset+1 - // char block = blockPage / $20 + // char block = blockPage / 0x20 // Which block is being remapped? (0-7) txa lsr diff --git a/src/test/ref/examples/mega65/memorymap-test.log b/src/test/ref/examples/mega65/memorymap-test.log index 34e9e57ef..84eba4621 100644 --- a/src/test/ref/examples/mega65/memorymap-test.log +++ b/src/test/ref/examples/mega65/memorymap-test.log @@ -1774,7 +1774,7 @@ memoryRemapBlock: { lda #>$100 sbc #0 sta.z pageOffset+1 - // char block = blockPage / $20 + // char block = blockPage / 0x20 // [26] memoryRemapBlock::block#0 = memoryRemapBlock::blockPage#2 >> 5 -- vbuaa=vbuxx_ror_5 // Which block is being remapped? (0-7) txa diff --git a/src/test/ref/gfxbank.asm b/src/test/ref/gfxbank.asm index 502f72fe8..5b0909ff1 100644 --- a/src/test/ref/gfxbank.asm +++ b/src/test/ref/gfxbank.asm @@ -13,7 +13,7 @@ .segment Code main: { .const vicSelectGfxBank1_toDd001_return = 3 - // CIA2->PORT_A_DDR = %00000011 + // CIA2->PORT_A_DDR = 0b00000011 lda #3 sta CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR // CIA2->PORT_A = toDd00(gfx) diff --git a/src/test/ref/gfxbank.log b/src/test/ref/gfxbank.log index a88982caf..16eea8a84 100644 --- a/src/test/ref/gfxbank.log +++ b/src/test/ref/gfxbank.log @@ -271,7 +271,7 @@ Score: 18 main: { .const vicSelectGfxBank1_toDd001_return = 3 // main::vicSelectGfxBank1 - // CIA2->PORT_A_DDR = %00000011 + // CIA2->PORT_A_DDR = 0b00000011 // [1] *((char *)CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) = 3 -- _deref_pbuc1=vbuc2 lda #3 sta CIA2+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR diff --git a/src/test/ref/incrementinarray.asm b/src/test/ref/incrementinarray.asm index 7c7dffc30..bfe9a6b10 100644 --- a/src/test/ref/incrementinarray.asm +++ b/src/test/ref/incrementinarray.asm @@ -84,7 +84,7 @@ print_str: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor diff --git a/src/test/ref/incrementinarray.log b/src/test/ref/incrementinarray.log index e7e0c5e28..d20452c21 100644 --- a/src/test/ref/incrementinarray.log +++ b/src/test/ref/incrementinarray.log @@ -1218,7 +1218,7 @@ print_ln: { // [22] phi print_line_cursor#10 = print_line_cursor#21 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [23] print_line_cursor#0 = print_line_cursor#10 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc diff --git a/src/test/ref/linegen.asm b/src/test/ref/linegen.asm index 443de3bfa..c6628187e 100644 --- a/src/test/ref/linegen.asm +++ b/src/test/ref/linegen.asm @@ -385,7 +385,7 @@ print_uint: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor @@ -419,10 +419,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } @@ -448,9 +448,9 @@ divr16u: { rol.z rem+1 // BYTE1(dividend) lda.z dividend+1 - // BYTE1(dividend) & $80 + // BYTE1(dividend) & 0x80 and #$80 - // if( (BYTE1(dividend) & $80) != 0 ) + // if( (BYTE1(dividend) & 0x80) != 0 ) cmp #0 beq __b2 // rem = rem | 1 diff --git a/src/test/ref/linegen.log b/src/test/ref/linegen.log index a5ce9bad7..f3fed3cd5 100644 --- a/src/test/ref/linegen.log +++ b/src/test/ref/linegen.log @@ -4336,7 +4336,7 @@ print_ln: { // [95] phi print_line_cursor#12 = print_line_cursor#23 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [96] print_line_cursor#0 = print_line_cursor#12 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc @@ -4382,11 +4382,11 @@ print_uchar: { // [131] phi print_char::ch#3 = print_char::ch#1 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [103] print_uchar::$2 = print_uchar::b#3 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [104] print_char::ch#2 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [105] call print_char @@ -4433,10 +4433,10 @@ divr16u: { // BYTE1(dividend) // [110] divr16u::$1 = byte1 divr16u::dividend#3 -- vbuaa=_byte1_vwuz1 lda.z dividend+1 - // BYTE1(dividend) & $80 + // BYTE1(dividend) & 0x80 // [111] divr16u::$2 = divr16u::$1 & $80 -- vbuaa=vbuaa_band_vbuc1 and #$80 - // if( (BYTE1(dividend) & $80) != 0 ) + // if( (BYTE1(dividend) & 0x80) != 0 ) // [112] if(divr16u::$2==0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq __b2 diff --git a/src/test/ref/millfork-benchmarks/linkedlist-kc.asm b/src/test/ref/millfork-benchmarks/linkedlist-kc.asm index 1352b2719..dc92177f9 100644 --- a/src/test/ref/millfork-benchmarks/linkedlist-kc.asm +++ b/src/test/ref/millfork-benchmarks/linkedlist-kc.asm @@ -241,7 +241,7 @@ print_ln: { lda #>print_screen sta.z print_line_cursor+1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor @@ -275,10 +275,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } diff --git a/src/test/ref/millfork-benchmarks/linkedlist-kc.log b/src/test/ref/millfork-benchmarks/linkedlist-kc.log index 88b764718..c90003b23 100644 --- a/src/test/ref/millfork-benchmarks/linkedlist-kc.log +++ b/src/test/ref/millfork-benchmarks/linkedlist-kc.log @@ -2503,7 +2503,7 @@ print_ln: { // [63] phi print_line_cursor#9 = print_line_cursor#0 [phi:print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [64] print_line_cursor#0 = print_line_cursor#9 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc @@ -2549,11 +2549,11 @@ print_uchar: { // [40] phi print_char::ch#3 = print_char::ch#0 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [71] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [72] print_char::ch#1 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [73] call print_char diff --git a/src/test/ref/millfork-benchmarks/plasma-kc.asm b/src/test/ref/millfork-benchmarks/plasma-kc.asm index 13116900e..f1332a9f1 100644 --- a/src/test/ref/millfork-benchmarks/plasma-kc.asm +++ b/src/test/ref/millfork-benchmarks/plasma-kc.asm @@ -441,7 +441,7 @@ print_ln: { lda #>print_screen sta.z print_line_cursor+1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor @@ -475,10 +475,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } diff --git a/src/test/ref/millfork-benchmarks/plasma-kc.log b/src/test/ref/millfork-benchmarks/plasma-kc.log index 8cbca9519..a8ae8ea42 100644 --- a/src/test/ref/millfork-benchmarks/plasma-kc.log +++ b/src/test/ref/millfork-benchmarks/plasma-kc.log @@ -3834,7 +3834,7 @@ print_ln: { // [101] phi print_line_cursor#9 = print_line_cursor#0 [phi:print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [102] print_line_cursor#0 = print_line_cursor#9 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc @@ -3880,11 +3880,11 @@ print_uchar: { // [113] phi print_char::ch#2 = print_char::ch#0 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [109] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [110] print_char::ch#1 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [111] call print_char diff --git a/src/test/ref/millfork-benchmarks/romsum-kc.asm b/src/test/ref/millfork-benchmarks/romsum-kc.asm index 6fca6761f..c66de34ca 100644 --- a/src/test/ref/millfork-benchmarks/romsum-kc.asm +++ b/src/test/ref/millfork-benchmarks/romsum-kc.asm @@ -171,7 +171,7 @@ print_uint_decimal: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor @@ -322,10 +322,10 @@ print_uchar: { lda DIGITS,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda DIGITS,x jsr print_char // } diff --git a/src/test/ref/millfork-benchmarks/romsum-kc.log b/src/test/ref/millfork-benchmarks/romsum-kc.log index 94fea5c71..18d59784f 100644 --- a/src/test/ref/millfork-benchmarks/romsum-kc.log +++ b/src/test/ref/millfork-benchmarks/romsum-kc.log @@ -3251,7 +3251,7 @@ print_ln: { // [49] phi print_line_cursor#10 = print_line_cursor#22 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [50] print_line_cursor#0 = print_line_cursor#10 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc @@ -3493,11 +3493,11 @@ print_uchar: { // [101] phi print_char::ch#3 = print_char::ch#1 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [90] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [91] print_char::ch#2 = DIGITS[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda DIGITS,x // [92] call print_char diff --git a/src/test/ref/millfork-benchmarks/sieve-kc.asm b/src/test/ref/millfork-benchmarks/sieve-kc.asm index 0d0171e0c..ce322e980 100644 --- a/src/test/ref/millfork-benchmarks/sieve-kc.asm +++ b/src/test/ref/millfork-benchmarks/sieve-kc.asm @@ -195,7 +195,7 @@ print_ln: { lda #>print_screen sta.z print_line_cursor+1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor @@ -229,10 +229,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } diff --git a/src/test/ref/millfork-benchmarks/sieve-kc.log b/src/test/ref/millfork-benchmarks/sieve-kc.log index 2d2c4c18b..f30deceec 100644 --- a/src/test/ref/millfork-benchmarks/sieve-kc.log +++ b/src/test/ref/millfork-benchmarks/sieve-kc.log @@ -2093,7 +2093,7 @@ print_ln: { // [63] phi print_line_cursor#9 = print_line_cursor#0 [phi:print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [64] print_line_cursor#0 = print_line_cursor#9 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc @@ -2139,11 +2139,11 @@ print_uchar: { // [75] phi print_char::ch#2 = print_char::ch#0 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [71] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [72] print_char::ch#1 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [73] call print_char diff --git a/src/test/ref/min-fmul-16.asm b/src/test/ref/min-fmul-16.asm index daa09ebed..a96544d55 100644 --- a/src/test/ref/min-fmul-16.asm +++ b/src/test/ref/min-fmul-16.asm @@ -354,10 +354,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } diff --git a/src/test/ref/min-fmul-16.log b/src/test/ref/min-fmul-16.log index a5d1cdb6c..87c534a0a 100644 --- a/src/test/ref/min-fmul-16.log +++ b/src/test/ref/min-fmul-16.log @@ -2499,11 +2499,11 @@ print_uchar: { // [65] phi print_char::ch#2 = print_char::ch#0 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [61] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [62] print_char::ch#1 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [63] call print_char diff --git a/src/test/ref/multiply-16bit-const.asm b/src/test/ref/multiply-16bit-const.asm index 50fcf8c8b..f4ae580bc 100644 --- a/src/test/ref/multiply-16bit-const.asm +++ b/src/test/ref/multiply-16bit-const.asm @@ -204,7 +204,7 @@ print_ulong_decimal: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor_1 diff --git a/src/test/ref/multiply-16bit-const.log b/src/test/ref/multiply-16bit-const.log index c04105c01..ae6c432a9 100644 --- a/src/test/ref/multiply-16bit-const.log +++ b/src/test/ref/multiply-16bit-const.log @@ -2699,7 +2699,7 @@ print_ln: { // [27] phi print_line_cursor#10 = print_line_cursor#16 [phi:print_ln/print_ln::@2->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [28] print_line_cursor#0 = print_line_cursor#10 + $28 -- pbuz1=pbuz2_plus_vbuc1 lda #$28 clc diff --git a/src/test/ref/primes-1000-2.asm b/src/test/ref/primes-1000-2.asm index ae248cc8c..6a45c433c 100644 --- a/src/test/ref/primes-1000-2.asm +++ b/src/test/ref/primes-1000-2.asm @@ -262,10 +262,10 @@ divr8u: { tya asl tay - // dividend & $80 + // dividend & 0x80 lda #$80 and.z dividend - // if( (dividend & $80) != 0 ) + // if( (dividend & 0x80) != 0 ) cmp #0 beq __b2 // rem = rem | 1 diff --git a/src/test/ref/primes-1000-2.log b/src/test/ref/primes-1000-2.log index daa38876b..8cc9ef3c7 100644 --- a/src/test/ref/primes-1000-2.log +++ b/src/test/ref/primes-1000-2.log @@ -3955,11 +3955,11 @@ divr8u: { tya asl tay - // dividend & $80 + // dividend & 0x80 // [64] divr8u::$1 = divr8u::dividend#3 & $80 -- vbuaa=vbuz1_band_vbuc1 lda #$80 and.z dividend - // if( (dividend & $80) != 0 ) + // if( (dividend & 0x80) != 0 ) // [65] if(divr8u::$1==0) goto divr8u::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq __b2 diff --git a/src/test/ref/printmsg.asm b/src/test/ref/printmsg.asm index fb62cdd88..73fb6a674 100644 --- a/src/test/ref/printmsg.asm +++ b/src/test/ref/printmsg.asm @@ -85,7 +85,7 @@ print_str: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor diff --git a/src/test/ref/printmsg.log b/src/test/ref/printmsg.log index 292681b07..ac2681de8 100644 --- a/src/test/ref/printmsg.log +++ b/src/test/ref/printmsg.log @@ -937,7 +937,7 @@ print_ln: { // [21] phi print_line_cursor#9 = print_line_cursor#18 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [22] print_line_cursor#0 = print_line_cursor#9 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc diff --git a/src/test/ref/processor-port-test.asm b/src/test/ref/processor-port-test.asm index 0d0ba8ec7..ad3ce358b 100644 --- a/src/test/ref/processor-port-test.asm +++ b/src/test/ref/processor-port-test.asm @@ -285,7 +285,7 @@ print_str: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor @@ -475,10 +475,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } diff --git a/src/test/ref/processor-port-test.log b/src/test/ref/processor-port-test.log index 77456ef24..06667acd0 100644 --- a/src/test/ref/processor-port-test.log +++ b/src/test/ref/processor-port-test.log @@ -4223,7 +4223,7 @@ print_ln: { // [75] phi print_line_cursor#35 = print_line_cursor#69 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [76] print_line_cursor#0 = print_line_cursor#35 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc @@ -4543,11 +4543,11 @@ print_uchar: { // [126] phi print_char::ch#3 = print_char::ch#1 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [134] print_uchar::$2 = print_uchar::b#8 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [135] print_char::ch#2 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [136] call print_char diff --git a/src/test/ref/semi-struct-1.asm b/src/test/ref/semi-struct-1.asm index 9f2280674..bc37b0c9b 100644 --- a/src/test/ref/semi-struct-1.asm +++ b/src/test/ref/semi-struct-1.asm @@ -151,10 +151,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } @@ -191,7 +191,7 @@ print_str: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor diff --git a/src/test/ref/semi-struct-1.log b/src/test/ref/semi-struct-1.log index 68e2418bd..1466970a7 100644 --- a/src/test/ref/semi-struct-1.log +++ b/src/test/ref/semi-struct-1.log @@ -2396,11 +2396,11 @@ print_uchar: { // [66] phi print_char::ch#3 = print_char::ch#1 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [44] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [45] print_char::ch#2 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [46] call print_char @@ -2465,7 +2465,7 @@ print_ln: { // [56] phi print_line_cursor#12 = print_line_cursor#26 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [57] print_line_cursor#0 = print_line_cursor#12 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc diff --git a/src/test/ref/sieve-min.asm b/src/test/ref/sieve-min.asm index 4aace3eae..d53b6e3a6 100644 --- a/src/test/ref/sieve-min.asm +++ b/src/test/ref/sieve-min.asm @@ -234,10 +234,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } diff --git a/src/test/ref/sieve-min.log b/src/test/ref/sieve-min.log index 230bd0d2d..333755eb1 100644 --- a/src/test/ref/sieve-min.log +++ b/src/test/ref/sieve-min.log @@ -1798,11 +1798,11 @@ print_uchar: { // [36] phi print_char::ch#3 = print_char::ch#0 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [44] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [45] print_char::ch#1 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [46] call print_char diff --git a/src/test/ref/signed-indexed-subtract.asm b/src/test/ref/signed-indexed-subtract.asm index 8d4699784..6a6f4b290 100644 --- a/src/test/ref/signed-indexed-subtract.asm +++ b/src/test/ref/signed-indexed-subtract.asm @@ -124,7 +124,7 @@ print_sint: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor @@ -219,10 +219,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } diff --git a/src/test/ref/signed-indexed-subtract.log b/src/test/ref/signed-indexed-subtract.log index b7ebd34f7..742e02f9e 100644 --- a/src/test/ref/signed-indexed-subtract.log +++ b/src/test/ref/signed-indexed-subtract.log @@ -1983,7 +1983,7 @@ print_ln: { // [40] phi print_line_cursor#10 = print_line_cursor#21 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [41] print_line_cursor#0 = print_line_cursor#10 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc @@ -2119,11 +2119,11 @@ print_uchar: { // [50] phi print_char::ch#4 = print_char::ch#2 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [63] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [64] print_char::ch#3 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [65] call print_char diff --git a/src/test/ref/sinus-basic.asm b/src/test/ref/sinus-basic.asm index a2639a942..4d31a6658 100644 --- a/src/test/ref/sinus-basic.asm +++ b/src/test/ref/sinus-basic.asm @@ -256,7 +256,7 @@ print_uint: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor @@ -290,10 +290,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } diff --git a/src/test/ref/sinus-basic.log b/src/test/ref/sinus-basic.log index a837a383f..e6b27d80f 100644 --- a/src/test/ref/sinus-basic.log +++ b/src/test/ref/sinus-basic.log @@ -2445,7 +2445,7 @@ print_ln: { // [78] phi print_line_cursor#7 = print_line_cursor#15 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [79] print_line_cursor#0 = print_line_cursor#7 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc @@ -2491,11 +2491,11 @@ print_uchar: { // [90] phi print_char::ch#2 = print_char::ch#0 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [86] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [87] print_char::ch#1 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [88] call print_char diff --git a/src/test/ref/sinusgen16.asm b/src/test/ref/sinusgen16.asm index 0208243a2..1e4ee2aec 100644 --- a/src/test/ref/sinusgen16.asm +++ b/src/test/ref/sinusgen16.asm @@ -428,7 +428,7 @@ sin16s: { sta.z mulu16_sel.return_1 lda.z mulu16_sel.return+1 sta.z mulu16_sel.return_1+1 - // unsigned int x3_6 = mulu16_sel(x3, $10000/6, 1) + // unsigned int x3_6 = mulu16_sel(x3, 0x10000/6, 1) // u[2.14] x^3 ldx #1 lda #<$10000/6 @@ -436,7 +436,7 @@ sin16s: { lda #>$10000/6 sta.z mulu16_sel.v2+1 jsr mulu16_sel - // unsigned int x3_6 = mulu16_sel(x3, $10000/6, 1) + // unsigned int x3_6 = mulu16_sel(x3, 0x10000/6, 1) // unsigned int usinx = x1 - x3_6 // u[1.15] x^3/6; lda.z x1 @@ -582,9 +582,9 @@ divr16u: { rol.z rem+1 // BYTE1(dividend) lda.z dividend+1 - // BYTE1(dividend) & $80 + // BYTE1(dividend) & 0x80 and #$80 - // if( (BYTE1(dividend) & $80) != 0 ) + // if( (BYTE1(dividend) & 0x80) != 0 ) cmp #0 beq __b2 // rem = rem | 1 @@ -678,10 +678,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } diff --git a/src/test/ref/sinusgen16.log b/src/test/ref/sinusgen16.log index 03d6776c4..5e49eb750 100644 --- a/src/test/ref/sinusgen16.log +++ b/src/test/ref/sinusgen16.log @@ -5032,7 +5032,7 @@ sin16s: { sta.z mulu16_sel.return_1+1 // sin16s::@8 // [79] sin16s::x3#0 = mulu16_sel::return#1 - // unsigned int x3_6 = mulu16_sel(x3, $10000/6, 1) + // unsigned int x3_6 = mulu16_sel(x3, 0x10000/6, 1) // [80] mulu16_sel::v1#2 = sin16s::x3#0 // [81] call mulu16_sel // u[2.14] x^3 @@ -5046,7 +5046,7 @@ sin16s: { sta.z mulu16_sel.v2+1 // [135] phi mulu16_sel::v1#5 = mulu16_sel::v1#2 [phi:sin16s::@8->mulu16_sel#2] -- register_copy jsr mulu16_sel - // unsigned int x3_6 = mulu16_sel(x3, $10000/6, 1) + // unsigned int x3_6 = mulu16_sel(x3, 0x10000/6, 1) // [82] mulu16_sel::return#2 = mulu16_sel::return#12 // sin16s::@9 // [83] sin16s::x3_6#0 = mulu16_sel::return#2 @@ -5271,10 +5271,10 @@ divr16u: { // BYTE1(dividend) // [120] divr16u::$1 = byte1 divr16u::dividend#3 -- vbuaa=_byte1_vwuz1 lda.z dividend+1 - // BYTE1(dividend) & $80 + // BYTE1(dividend) & 0x80 // [121] divr16u::$2 = divr16u::$1 & $80 -- vbuaa=vbuaa_band_vbuc1 and #$80 - // if( (BYTE1(dividend) & $80) != 0 ) + // if( (BYTE1(dividend) & 0x80) != 0 ) // [122] if(divr16u::$2==0) goto divr16u::@2 -- vbuaa_eq_0_then_la1 cmp #0 beq __b2 @@ -5409,11 +5409,11 @@ print_uchar: { // [108] phi print_char::ch#5 = print_char::ch#3 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [148] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [149] print_char::ch#4 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [150] call print_char diff --git a/src/test/ref/struct-ptr-22.asm b/src/test/ref/struct-ptr-22.asm index df06f5063..29a6b2b89 100644 --- a/src/test/ref/struct-ptr-22.asm +++ b/src/test/ref/struct-ptr-22.asm @@ -127,10 +127,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } @@ -139,7 +139,7 @@ print_uchar: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor diff --git a/src/test/ref/struct-ptr-22.log b/src/test/ref/struct-ptr-22.log index a2ca0c0e0..9ea934a9c 100644 --- a/src/test/ref/struct-ptr-22.log +++ b/src/test/ref/struct-ptr-22.log @@ -1669,11 +1669,11 @@ print_uchar: { // [47] phi print_char::ch#3 = print_char::ch#1 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [32] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [33] print_char::ch#2 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [34] call print_char @@ -1693,7 +1693,7 @@ print_ln: { // [37] phi print_line_cursor#11 = print_line_cursor#21 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [38] print_line_cursor#0 = print_line_cursor#11 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc diff --git a/src/test/ref/struct-ptr-26.asm b/src/test/ref/struct-ptr-26.asm index c16f9c49a..b11a8f7ac 100644 --- a/src/test/ref/struct-ptr-26.asm +++ b/src/test/ref/struct-ptr-26.asm @@ -68,10 +68,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } diff --git a/src/test/ref/struct-ptr-26.log b/src/test/ref/struct-ptr-26.log index 883b54c3a..09f00e4fe 100644 --- a/src/test/ref/struct-ptr-26.log +++ b/src/test/ref/struct-ptr-26.log @@ -773,11 +773,11 @@ print_uchar: { // [18] phi print_char::ch#2 = print_char::ch#0 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [14] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [15] print_char::ch#1 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [16] call print_char diff --git a/src/test/ref/test-comparisons-sword.asm b/src/test/ref/test-comparisons-sword.asm index acba4b553..12e924c9a 100644 --- a/src/test/ref/test-comparisons-sword.asm +++ b/src/test/ref/test-comparisons-sword.asm @@ -310,7 +310,7 @@ compare: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor @@ -458,10 +458,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } diff --git a/src/test/ref/test-comparisons-sword.log b/src/test/ref/test-comparisons-sword.log index 8ca79b5a4..b1a7d8abb 100644 --- a/src/test/ref/test-comparisons-sword.log +++ b/src/test/ref/test-comparisons-sword.log @@ -3815,7 +3815,7 @@ print_ln: { // [64] phi print_line_cursor#10 = print_line_cursor#21 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [65] print_line_cursor#0 = print_line_cursor#10 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc @@ -4042,11 +4042,11 @@ print_uchar: { // [92] phi print_char::ch#6 = print_char::ch#3 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [105] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [106] print_char::ch#4 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [107] call print_char diff --git a/src/test/ref/test-comparisons-word.asm b/src/test/ref/test-comparisons-word.asm index 2fa9432e7..1ed1a8a06 100644 --- a/src/test/ref/test-comparisons-word.asm +++ b/src/test/ref/test-comparisons-word.asm @@ -312,7 +312,7 @@ compare: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor @@ -431,10 +431,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } diff --git a/src/test/ref/test-comparisons-word.log b/src/test/ref/test-comparisons-word.log index 993118abf..56b893167 100644 --- a/src/test/ref/test-comparisons-word.log +++ b/src/test/ref/test-comparisons-word.log @@ -3641,7 +3641,7 @@ print_ln: { // [66] phi print_line_cursor#10 = print_line_cursor#21 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [67] print_line_cursor#0 = print_line_cursor#10 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc @@ -3818,11 +3818,11 @@ print_uchar: { // [89] phi print_char::ch#5 = print_char::ch#1 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [97] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [98] print_char::ch#2 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [99] call print_char diff --git a/src/test/ref/test-keyboard-space.asm b/src/test/ref/test-keyboard-space.asm index d6152c9e4..358446ebe 100644 --- a/src/test/ref/test-keyboard-space.asm +++ b/src/test/ref/test-keyboard-space.asm @@ -65,11 +65,11 @@ main: { } // Initialize keyboard reading by setting CIA#1 Data Direction Registers keyboard_init: { - // CIA1->PORT_A_DDR = $ff + // CIA1->PORT_A_DDR = 0xff // Keyboard Matrix Columns Write Mode lda #$ff sta CIA1+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR - // CIA1->PORT_B_DDR = $00 + // CIA1->PORT_B_DDR = 0x00 // Keyboard Matrix Columns Read Mode lda #0 sta CIA1+OFFSET_STRUCT_MOS6526_CIA_PORT_B_DDR diff --git a/src/test/ref/test-keyboard-space.log b/src/test/ref/test-keyboard-space.log index d07a3e81f..3563f58a1 100644 --- a/src/test/ref/test-keyboard-space.log +++ b/src/test/ref/test-keyboard-space.log @@ -681,12 +681,12 @@ main: { // keyboard_init // Initialize keyboard reading by setting CIA#1 Data Direction Registers keyboard_init: { - // CIA1->PORT_A_DDR = $ff + // CIA1->PORT_A_DDR = 0xff // [10] *((char *)CIA1+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) = $ff -- _deref_pbuc1=vbuc2 // Keyboard Matrix Columns Write Mode lda #$ff sta CIA1+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR - // CIA1->PORT_B_DDR = $00 + // CIA1->PORT_B_DDR = 0x00 // [11] *((char *)CIA1+OFFSET_STRUCT_MOS6526_CIA_PORT_B_DDR) = 0 -- _deref_pbuc1=vbuc2 // Keyboard Matrix Columns Read Mode lda #0 diff --git a/src/test/ref/test-keyboard.asm b/src/test/ref/test-keyboard.asm index adae3f743..55d18e204 100644 --- a/src/test/ref/test-keyboard.asm +++ b/src/test/ref/test-keyboard.asm @@ -213,11 +213,11 @@ main: { } // Initialize keyboard reading by setting CIA#1 Data Direction Registers keyboard_init: { - // CIA1->PORT_A_DDR = $ff + // CIA1->PORT_A_DDR = 0xff // Keyboard Matrix Columns Write Mode lda #$ff sta CIA1+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR - // CIA1->PORT_B_DDR = $00 + // CIA1->PORT_B_DDR = 0x00 // Keyboard Matrix Columns Read Mode lda #0 sta CIA1+OFFSET_STRUCT_MOS6526_CIA_PORT_B_DDR diff --git a/src/test/ref/test-keyboard.log b/src/test/ref/test-keyboard.log index 4ca5bbf32..1b6f46b51 100644 --- a/src/test/ref/test-keyboard.log +++ b/src/test/ref/test-keyboard.log @@ -1975,12 +1975,12 @@ main: { // keyboard_init // Initialize keyboard reading by setting CIA#1 Data Direction Registers keyboard_init: { - // CIA1->PORT_A_DDR = $ff + // CIA1->PORT_A_DDR = 0xff // [45] *((char *)CIA1+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR) = $ff -- _deref_pbuc1=vbuc2 // Keyboard Matrix Columns Write Mode lda #$ff sta CIA1+OFFSET_STRUCT_MOS6526_CIA_PORT_A_DDR - // CIA1->PORT_B_DDR = $00 + // CIA1->PORT_B_DDR = 0x00 // [46] *((char *)CIA1+OFFSET_STRUCT_MOS6526_CIA_PORT_B_DDR) = 0 -- _deref_pbuc1=vbuc2 // Keyboard Matrix Columns Read Mode lda #0 diff --git a/src/test/ref/test-lowhigh.asm b/src/test/ref/test-lowhigh.asm index 5d8c76ad4..5b008c493 100644 --- a/src/test/ref/test-lowhigh.asm +++ b/src/test/ref/test-lowhigh.asm @@ -236,10 +236,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } @@ -248,7 +248,7 @@ print_uchar: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor_1 diff --git a/src/test/ref/test-lowhigh.log b/src/test/ref/test-lowhigh.log index 3bbd8dc31..9f201c87d 100644 --- a/src/test/ref/test-lowhigh.log +++ b/src/test/ref/test-lowhigh.log @@ -2456,11 +2456,11 @@ print_uchar: { // [50] phi print_char::ch#8 = print_char::ch#0 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [64] print_uchar::$2 = print_uchar::b#6 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [65] print_char::ch#1 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [66] call print_char @@ -2480,7 +2480,7 @@ print_ln: { // [69] phi print_line_cursor#10 = print_line_cursor#16 [phi:print_ln/print_ln::@2->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [70] print_line_cursor#0 = print_line_cursor#10 + $28 -- pbuz1=pbuz2_plus_vbuc1 lda #$28 clc diff --git a/src/test/ref/test-signed-word-minus-byte.asm b/src/test/ref/test-signed-word-minus-byte.asm index be7b08267..29802a35b 100644 --- a/src/test/ref/test-signed-word-minus-byte.asm +++ b/src/test/ref/test-signed-word-minus-byte.asm @@ -132,7 +132,7 @@ print_char: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor @@ -213,10 +213,10 @@ print_uchar: { lda print_hextab,y // Table of hexadecimal digits jsr print_char - // b&$f + // b&0xf lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) lda print_hextab,x jsr print_char // } diff --git a/src/test/ref/test-signed-word-minus-byte.log b/src/test/ref/test-signed-word-minus-byte.log index ae2da3cb4..e3d54bf67 100644 --- a/src/test/ref/test-signed-word-minus-byte.log +++ b/src/test/ref/test-signed-word-minus-byte.log @@ -1833,7 +1833,7 @@ print_ln: { // [36] phi print_line_cursor#10 = print_line_cursor#21 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [37] print_line_cursor#0 = print_line_cursor#10 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc @@ -1950,11 +1950,11 @@ print_uchar: { // [31] phi print_char::ch#5 = print_char::ch#2 [phi:print_uchar->print_char#1] -- register_copy jsr print_char // print_uchar::@1 - // b&$f + // b&0xf // [55] print_uchar::$2 = print_uchar::b#2 & $f -- vbuxx=vbuxx_band_vbuc1 lda #$f axs #0 - // print_char(print_hextab[b&$f]) + // print_char(print_hextab[b&0xf]) // [56] print_char::ch#3 = print_hextab[print_uchar::$2] -- vbuaa=pbuc1_derefidx_vbuxx lda print_hextab,x // [57] call print_char diff --git a/src/test/ref/travis1.asm b/src/test/ref/travis1.asm index 5a7d6945d..b895d9caa 100644 --- a/src/test/ref/travis1.asm +++ b/src/test/ref/travis1.asm @@ -127,7 +127,7 @@ print_str: { // Print a newline print_ln: { __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 lda #$28 clc adc.z print_line_cursor diff --git a/src/test/ref/travis1.log b/src/test/ref/travis1.log index 3097d73f5..6c6ef4d24 100644 --- a/src/test/ref/travis1.log +++ b/src/test/ref/travis1.log @@ -1423,7 +1423,7 @@ print_ln: { // [33] phi print_line_cursor#14 = print_line_cursor#24 [phi:print_ln/print_ln::@1->print_ln::@1#0] -- register_copy // print_ln::@1 __b1: - // print_line_cursor + $28 + // print_line_cursor + 0x28 // [34] print_line_cursor#15 = print_line_cursor#14 + $28 -- pbuz1=pbuz1_plus_vbuc1 lda #$28 clc