Updated %nn to 0bnn and $nn to 0xnn.

This commit is contained in:
Jesper Gravgaard 2024-01-02 19:45:16 +01:00
parent 8416086294
commit 294bb27eec
96 changed files with 456 additions and 456 deletions

View File

@ -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();

View File

@ -9,58 +9,58 @@
#include <c64.h>
/// 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;

View File

@ -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.

View File

@ -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;

View File

@ -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)]);
}

View File

@ -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];
}

View File

@ -1,7 +1,7 @@
#include <stdlib.h>
#include <string.h>
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<print_char_cursor);
print_char_cursor = print_line_cursor;
}
@ -163,7 +163,7 @@ const char print_hextab[] = "0123456789abcdef"z;
void print_uchar(char b) {
// Table of hexadecimal digits
print_char(print_hextab[b>>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

View File

@ -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);
}

View File

@ -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

View File

@ -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)
}
}};

View File

@ -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;

View File

@ -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;

View File

@ -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_lo[512];
char __align(0x100) mulf_sqr1_lo[512];
// >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_lo[512];
char __align(0x100) mulf_sqr2_lo[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 {

View File

@ -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<<block;
memoryRemap(blockBits, pageOffset, pageOffset);
}

View File

@ -4,24 +4,24 @@
// 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);
}

View File

@ -9,18 +9,18 @@
#include <multiply.h>
// 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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 !+

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
// }

View File

@ -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

View File

@ -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
// }

View File

@ -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

View File

@ -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
// }

View File

@ -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

View File

@ -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
// }

View File

@ -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

View File

@ -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
// }

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
// }

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
// }

View File

@ -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

View File

@ -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
// }

View File

@ -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

View File

@ -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
// }

View File

@ -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

View File

@ -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
// }

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
// }

View File

@ -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

View File

@ -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
// }

View File

@ -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

View File

@ -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
// }

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
// }

View File

@ -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

View File

@ -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

View File

@ -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