diff --git a/src/main/kc/include/ricoh_2c02.h b/src/main/kc/include/ricoh_2c02.h index 1cb5503d1..556f480b2 100644 --- a/src/main/kc/include/ricoh_2c02.h +++ b/src/main/kc/include/ricoh_2c02.h @@ -136,5 +136,7 @@ struct RICOH_2C02 { }; // PPU Status Register for reading in ASM -volatile char * PPU_PPUSTATUS = 0x2002; +volatile char * const PPU_PPUSTATUS = 0x2002; +// PPU Data Register for reading in ASM +volatile char * const PPU_PPUDATA = 0x2007; diff --git a/src/main/kc/lib/conio-nes.c b/src/main/kc/lib/conio-nes.c index 423d54872..79bed588e 100644 --- a/src/main/kc/lib/conio-nes.c +++ b/src/main/kc/lib/conio-nes.c @@ -104,6 +104,11 @@ void cputln() { cscroll(); } +#pragma data_seg(GameRam) +// Buffer used for scrolling the NES screen +char conio_cscroll_buffer[CONIO_WIDTH]; +#pragma data_seg(Data) + // Scroll the entire screen if the cursor is beyond the last line void cscroll() { if(conio_cursor_y==CONIO_HEIGHT) { @@ -112,10 +117,10 @@ void cscroll() { char* line1 = CONIO_SCREEN_TEXT; char* line2 = CONIO_SCREEN_TEXT+CONIO_WIDTH; for(char y=0;yPPUDATA = val; } -// Read one byte from PPU memory -// The byte is read from the current PPU address pointed to by the (autoincrementing) PPU->PPUADDR +// Read one byte from the PPU memory +// Note: Reading from the PPU works in a somewhat un-intuitive way. +// The read operation returns the current contents of the read-buffer and then fills the buffer from the current +// PPU->PPUADDR, which is also auto-incremented. +// This means the value returned is from the previous read address. +// If you want to get the value at PPU->PPUADDR you must call read twice. inline char ppuDataRead() { // Transfer from PPU return PPU->PPUDATA; @@ -149,6 +153,20 @@ void ppuDataTransfer(void* const ppuData, void* const cpuData, unsigned int size ppuDataPut(*cpuSrc++); } +// Transfer a number of bytes from the PPU memory to the CPU memory +// - ppuData : Pointer in the PPU memory +// - cpuData : Pointer to the CPU memory (RAM of ROM) +// - size : The number of bytes to transfer +void ppuDataFetch(void* const cpuData, void* const ppuData, unsigned int size) { + ppuDataPrepare(ppuData); + // Perform a dummy-read to discard the current value in the data read buffer and update it with the first byte from the PPU address + asm { lda PPU_PPUDATA } + // Fetch from PPU to CPU + char* cpuDst = (char*)cpuData; + for(unsigned int i=0;i #include +#include + +#pragma data_seg(GameRam) +char num_buffer[11]; +char scroll_buffer[32]; +#pragma data_seg(Data) + // RESET Called when the NES is reset, including when it is turned on. void main() { @@ -14,12 +21,21 @@ void main() { ppuDataFill(PPU_ATTRIBUTE_TABLE_1, 0, 0x40); // Print a string clrscr(); - cputs("hello world!\ni am nes\n look at me \n\n"); - + for(char x=1;x$20*SIZEOF_BYTE + sta.z ppuDataTransfer.size+1 + lda #PALETTE + sta.z ppuDataTransfer.cpuData+1 + lda #PPU_PALETTE + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData+1 jsr ppuDataTransfer // ppuDataFill(PPU_ATTRIBUTE_TABLE_0, 0, 0x40) // Fill the PPU attribute table @@ -195,8 +217,27 @@ main: { // clrscr() // Print a string jsr clrscr - // cputs("hello world!\ni am nes\n look at me \n\n") - jsr cputs + lda #1 + sta.z x + __b7: + // for(char x=1;xPPUMASK = 0b00011110 lda #$1e sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK - __b1: + __b4: // Infinite loop - jmp __b1 - .segment Data - s: .text @"hello world!\ni am nes\n look at me \n\n" - .byte 0 -} -.segment Code -// Output a NUL-terminated string at the current cursor position -// cputs(byte* zp(7) s) -cputs: { - .label s = 7 - lda #main.s - sta.z s+1 - __b1: - // c=*s++ - ldy #0 - lda (s),y - // while(c=*s++) - inc.z s - bne !+ - inc.z s+1 - !: - cmp #0 - bne __b2 - // } - rts + jmp __b4 + __b3: + // uctoa(i&0xf, num_buffer, HEXADECIMAL) + lda #$f + and.z i + tax + jsr uctoa + // cputsxy(i, i, num_buffer) + ldx.z i + txa + jsr cputsxy + // for(char i=0;iPPU_NAME_TABLE_0+$20 sta.z line2+1 - lda #0 - sta.z y + ldx #0 __b1: // for(char y=0;y$20 + sta.z ppuDataTransfer.size+1 + lda #scroll_buffer + sta.z ppuDataTransfer.cpuData+1 + jsr ppuDataTransfer + // line1 += CONIO_WIDTH + lda #$20 + clc + adc.z line1 + sta.z line1 + bcc !+ inc.z line1+1 !: - // for(char x=0;xppuData lda.z ppuDataPrepare1_ppuData+1 // PPU->PPUADDR = >ppuData @@ -400,16 +469,51 @@ ppuDataSet: { lda.z ppuDataPrepare1_ppuData // PPU->PPUADDR = PPUDATA = val - stx PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + lda #<0 + sta.z i + sta.z i+1 + __b1: + // for(unsigned int i=0;iPPUDATA = val + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + // ppuDataPut(*cpuSrc++); + inc.z cpuSrc + bne !+ + inc.z cpuSrc+1 + !: + // for(unsigned int i=0;ippuData lda.z ppuData+1 // PPU->PPUADDR = >ppuData @@ -418,19 +522,54 @@ ppuDataGet: { lda.z ppuData // PPU->PPUADDR = PPUDATA; - lda PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + // asm + // Perform a dummy-read to discard the current value in the data read buffer and update it with the first byte from the PPU address + lda PPU_PPUDATA + lda #cpuData + sta.z cpuDst+1 + lda #<0 + sta.z i + sta.z i+1 + __b1: + // for(unsigned int i=0;isize + bcc ppuDataRead1 + bne !+ + lda.z i + cmp #PPUDATA; + lda PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + // *cpuDst++ = ppuDataRead() + ldy #0 + sta (cpuDst),y + // *cpuDst++ = ppuDataRead(); + inc.z cpuDst + bne !+ + inc.z cpuDst+1 + !: + // for(unsigned int i=0;ippuData lda.z ppuDataPrepare1_ppuData+1 // PPU->PPUADDR = >ppuData @@ -465,6 +604,211 @@ ppuDataFill: { !: jmp __b1 } +// Set one byte in PPU memory +// - ppuData : Pointer in the PPU memory +// - val : The value to set +// ppuDataSet(byte* zp($17) ppuData, byte register(A) val) +ppuDataSet: { + .label ppuData = $17 + // >ppuData + ldx.z ppuData+1 + // PPU->PPUADDR = >ppuData + stx PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + // PPUADDR = PPUDATA = val + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + // } + rts +} +// Set the cursor to the specified position +// gotoxy(byte register(X) x, byte register(A) y) +gotoxy: { + .label __5 = $13 + .label __6 = $13 + .label line_offset = $13 + // if(y>CONIO_HEIGHT) + cmp #$1e+1 + bcc __b1 + lda #0 + __b1: + // if(x>=CONIO_WIDTH) + cpx #$20 + bcc __b2 + ldx #0 + __b2: + // conio_cursor_x = x + stx.z conio_cursor_x + // conio_cursor_y = y + sta.z conio_cursor_y + // (unsigned int)y*CONIO_WIDTH + sta.z __6 + lda #0 + sta.z __6+1 + // line_offset = (unsigned int)y*CONIO_WIDTH + asl.z line_offset + rol.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + // CONIO_SCREEN_TEXT + line_offset + clc + lda.z __5 + adc #PPU_NAME_TABLE_0 + sta.z __5+1 + // conio_line_text = CONIO_SCREEN_TEXT + line_offset + // } + rts +} +// Move cursor and output a NUL-terminated string +// Same as "gotoxy (x, y); puts (s);" +// cputsxy(byte register(X) x, byte register(A) y) +cputsxy: { + // gotoxy(x, y) + jsr gotoxy + // cputs(s) + jsr cputs + // } + rts +} +// Output a NUL-terminated string at the current cursor position +// cputs(byte* zp($d) s) +cputs: { + .label s = $d + lda #num_buffer + sta.z s+1 + __b1: + // c=*s++ + ldy #0 + lda (s),y + // while(c=*s++) + inc.z s + bne !+ + inc.z s+1 + !: + cmp #0 + bne __b2 + // } + rts + __b2: + // cputc(c) + tax + jsr cputc + jmp __b1 +} +// Converts unsigned number value to a string representing it in RADIX format. +// If the leading digits are zero they are not included in the string. +// - value : The number to be converted to RADIX +// - buffer : receives the string representing the number and zero-termination. +// - radix : The radix to convert the number to (from the enum RADIX) +// uctoa(byte register(X) value, byte* zp($f) buffer) +uctoa: { + .const max_digits = 2 + .label digit_value = $1b + .label buffer = $f + .label digit = $11 + .label started = $12 + lda #num_buffer + sta.z buffer+1 + lda #0 + sta.z started + sta.z digit + __b1: + // for( char digit=0; digit= digit_value) + lda #0 + cmp.z started + bne __b5 + cpx.z digit_value + bcs __b5 + __b4: + // for( char digit=0; digit= sub) + cpx.z sub + bcs __b2 + // *buffer = DIGITS[digit] + lda DIGITS,y + ldy #0 + sta (buffer),y + // } + rts + __b2: + // digit++; + iny + // value -= sub + txa + sec + sbc.z sub + tax + jmp __b1 +} // clears the screen and moves the cursor to the upper left-hand corner of the screen. clrscr: { // ppuDataFill(CONIO_SCREEN_TEXT, ' ', 0x3c0) @@ -491,60 +835,6 @@ clrscr: { // } rts } -// Transfer a number of bytes from the CPU memory to the PPU memory -// - cpuData : Pointer to the CPU memory (RAM of ROM) -// - ppuData : Pointer in the PPU memory -// - size : The number of bytes to transfer -ppuDataTransfer: { - .const size = $20*SIZEOF_BYTE - .label ppuData = PPU_PALETTE - .label cpuData = PALETTE - // Transfer to PPU - .label cpuSrc = 9 - .label i = 7 - // PPU->PPUADDR = >ppuData - lda #>ppuData - sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - // PPU->PPUADDR = cpuData - sta.z cpuSrc+1 - lda #<0 - sta.z i - sta.z i+1 - __b1: - // for(unsigned int i=0;isize - bcc __b2 - bne !+ - lda.z i - cmp #PPUDATA = val - sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA - // ppuDataPut(*cpuSrc++); - inc.z cpuSrc - bne !+ - inc.z cpuSrc+1 - !: - // for(unsigned int i=0;iJOY1 = 1 // Latch the controller buttons lda #1 @@ -657,6 +947,14 @@ readJoy1: { inx jmp __b1 } +.segment Data + // The digits used for numbers + DIGITS: .text "0123456789abcdef" + // Values of hexadecimal digits + RADIX_HEXADECIMAL_VALUES_CHAR: .byte $10 +.segment GameRam + num_buffer: .fill $b, 0 + scroll_buffer: .fill $20, 0 .segment Data // Color Palette PALETTE: .byte 1, $21, $f, $30, 1, $21, $f, $30, 1, $21, $f, $30, 1, $21, $f, $30, 1, $f, $30, 8, 1, $f, $18, 8, 1, $30, $37, $1a, $f, $f, $f, $f diff --git a/src/test/ref/examples/nes-conio/nes-conio.cfg b/src/test/ref/examples/nes-conio/nes-conio.cfg index fbad50502..4d58ea63a 100644 --- a/src/test/ref/examples/nes-conio/nes-conio.cfg +++ b/src/test/ref/examples/nes-conio/nes-conio.cfg @@ -64,311 +64,496 @@ main::initNES1_waitForVBlank2_@1: scope:[main] from main::initNES1_waitForVBlan to:main::initNES1_@7 main::initNES1_@7: scope:[main] from main::initNES1_waitForVBlank2_@1 asm { ldaPPU_PPUSTATUS } - to:main::@2 -main::@2: scope:[main] from main::initNES1_@7 + to:main::@6 +main::@6: scope:[main] from main::initNES1_@7 [34] phi() [35] call ppuDataTransfer - to:main::@3 -main::@3: scope:[main] from main::@2 + to:main::@12 +main::@12: scope:[main] from main::@6 [36] phi() [37] call ppuDataFill - to:main::@4 -main::@4: scope:[main] from main::@3 + to:main::@13 +main::@13: scope:[main] from main::@12 [38] phi() [39] call ppuDataFill - to:main::@5 -main::@5: scope:[main] from main::@4 + to:main::@14 +main::@14: scope:[main] from main::@13 [40] phi() [41] call clrscr - to:main::@6 -main::@6: scope:[main] from main::@5 - [42] phi() - [43] call cputs + to:main::screensizex1 +main::screensizex1: scope:[main] from main::@14 main::@15 + [42] (byte) main::x#10 ← phi( main::@14/(byte) 1 main::@15/(byte) main::x#1 ) to:main::@7 -main::@7: scope:[main] from main::@6 - [44] (volatile byte) x_scroll ← (byte) 0 - [45] (volatile byte) y_scroll ← (byte) -8 +main::@7: scope:[main] from main::screensizex1 + [43] if((byte) main::x#10<(const byte) main::screensizex1_return#0-(byte) 1) goto main::@1 + to:main::screensizey2 +main::screensizey2: scope:[main] from main::@16 main::@7 + [44] (byte) main::y#10 ← phi( main::@7/(byte) 1 main::@16/(byte) main::y#1 ) + to:main::@9 +main::@9: scope:[main] from main::screensizey2 + [45] if((byte) main::y#10<(const byte) main::screensizey2_return#0-(byte) 3) goto main::@2 + to:main::screensizey3 +main::screensizey3: scope:[main] from main::@18 main::@9 + [46] (byte) main::i#2 ← phi( main::@18/(byte) main::i#1 main::@9/(byte) 0 ) + to:main::@11 +main::@11: scope:[main] from main::screensizey3 + [47] if((byte) main::i#2<(const byte) main::screensizey3_return#0) goto main::@3 + to:main::@4 +main::@4: scope:[main] from main::@11 + [48] (volatile byte) x_scroll ← (byte) 0 + [49] (volatile byte) y_scroll ← (byte) -8 to:main::enableVideoOutput1 -main::enableVideoOutput1: scope:[main] from main::@7 - [46] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 - [47] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e - to:main::@1 -main::@1: scope:[main] from main::@1 main::enableVideoOutput1 - [48] phi() - to:main::@1 +main::enableVideoOutput1: scope:[main] from main::@4 + [50] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 + [51] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e + to:main::@5 +main::@5: scope:[main] from main::@5 main::enableVideoOutput1 + [52] phi() + to:main::@5 +main::@3: scope:[main] from main::@11 + [53] (byte) uctoa::value#1 ← (byte) main::i#2 & (byte) $f + [54] call uctoa + to:main::@17 +main::@17: scope:[main] from main::@3 + [55] (byte) cputsxy::x#0 ← (byte) main::i#2 + [56] (byte) cputsxy::y#0 ← (byte) main::i#2 + [57] call cputsxy + to:main::@18 +main::@18: scope:[main] from main::@17 + [58] (byte) main::i#1 ← ++ (byte) main::i#2 + to:main::screensizey3 +main::@2: scope:[main] from main::@9 + [59] (byte) cputcxy::y#2 ← (byte) main::y#10 + [60] call cputcxy + to:main::screensizex2 +main::screensizex2: scope:[main] from main::@2 + [61] phi() + to:main::@10 +main::@10: scope:[main] from main::screensizex2 + [62] (byte) cputcxy::y#3 ← (byte) main::y#10 + [63] call cputcxy + to:main::@16 +main::@16: scope:[main] from main::@10 + [64] (byte) main::y#1 ← ++ (byte) main::y#10 + to:main::screensizey2 +main::@1: scope:[main] from main::@7 + [65] (byte) cputcxy::x#0 ← (byte) main::x#10 + [66] call cputcxy + to:main::screensizey1 +main::screensizey1: scope:[main] from main::@1 + [67] phi() + to:main::@8 +main::@8: scope:[main] from main::screensizey1 + [68] (byte) cputcxy::x#1 ← (byte) main::x#10 + [69] call cputcxy + to:main::@15 +main::@15: scope:[main] from main::@8 + [70] (byte) main::x#1 ← ++ (byte) main::x#10 + to:main::screensizex1 -(void()) cputs((to_nomodify byte*) cputs::s) -cputs: scope:[cputs] from main::@6 - [49] phi() - to:cputs::@1 -cputs::@1: scope:[cputs] from cputs cputs::@2 - [50] (to_nomodify byte*) cputs::s#2 ← phi( cputs/(const byte*) main::s cputs::@2/(to_nomodify byte*) cputs::s#0 ) - [51] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#2) - [52] (to_nomodify byte*) cputs::s#0 ← ++ (to_nomodify byte*) cputs::s#2 - [53] if((byte) 0!=(byte) cputs::c#1) goto cputs::@2 - to:cputs::@return -cputs::@return: scope:[cputs] from cputs::@1 - [54] return +(void()) cputcxy((byte) cputcxy::x , (byte) cputcxy::y , (byte) cputcxy::c) +cputcxy: scope:[cputcxy] from main::@1 main::@10 main::@2 main::@8 + [71] (byte) cputcxy::c#4 ← phi( main::@1/(byte) '-' main::@8/(byte) '-' main::@10/(byte) 'i' main::@2/(byte) 'i' ) + [71] (byte) cputcxy::y#4 ← phi( main::@1/(byte) 1 main::@8/(const byte) main::screensizey1_return#0-(byte) 4 main::@10/(byte) cputcxy::y#3 main::@2/(byte) cputcxy::y#2 ) + [71] (byte) cputcxy::x#4 ← phi( main::@1/(byte) cputcxy::x#0 main::@8/(byte) cputcxy::x#1 main::@10/(const byte) main::screensizex2_return#0-(byte) 2 main::@2/(byte) 1 ) + [72] (byte) gotoxy::x#2 ← (byte) cputcxy::x#4 + [73] (byte) gotoxy::y#2 ← (byte) cputcxy::y#4 + [74] call gotoxy + to:cputcxy::@1 +cputcxy::@1: scope:[cputcxy] from cputcxy + [75] (byte) cputc::c#1 ← (byte) cputcxy::c#4 + [76] call cputc + to:cputcxy::@return +cputcxy::@return: scope:[cputcxy] from cputcxy::@1 + [77] return to:@return -cputs::@2: scope:[cputs] from cputs::@1 - [55] (byte) cputc::c#0 ← (byte) cputs::c#1 - [56] call cputc - to:cputs::@1 (void()) cputc((byte) cputc::c) -cputc: scope:[cputc] from cputs::@2 - [57] if((byte) cputc::c#0==(byte) ' +cputc: scope:[cputc] from cputcxy::@1 cputs::@2 + [78] (byte) cputc::c#2 ← phi( cputcxy::@1/(byte) cputc::c#1 cputs::@2/(byte) cputc::c#0 ) + [79] if((byte) cputc::c#2==(byte) ' ') goto cputc::@1 to:cputc::@2 cputc::@2: scope:[cputc] from cputc - [58] (nomodify byte*) ppuDataSet::ppuData#0 ← (byte*) conio_line_text + (byte) conio_cursor_x - [59] (byte) ppuDataSet::val#0 ← (byte) cputc::c#0 - [60] (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#2 ← (void*)(nomodify byte*) ppuDataSet::ppuData#0 - [61] call ppuDataSet + [80] (nomodify byte*) ppuDataSet::ppuData#0 ← (byte*) conio_line_text + (byte) conio_cursor_x + [81] (byte) ppuDataSet::val#0 ← (byte) cputc::c#2 + [82] call ppuDataSet to:cputc::@4 cputc::@4: scope:[cputc] from cputc::@2 - [62] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x - [63] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return + [83] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x + [84] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return to:cputc::@3 cputc::@3: scope:[cputc] from cputc::@4 - [64] phi() - [65] call cputln + [85] phi() + [86] call cputln to:cputc::@return cputc::@return: scope:[cputc] from cputc::@1 cputc::@3 cputc::@4 - [66] return + [87] return to:@return cputc::@1: scope:[cputc] from cputc - [67] phi() - [68] call cputln + [88] phi() + [89] call cputln to:cputc::@return (void()) cputln() cputln: scope:[cputln] from cputc::@1 cputc::@3 - [69] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $20 - [70] (byte) conio_cursor_x ← (byte) 0 - [71] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y - [72] call cscroll + [90] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $20 + [91] (byte) conio_cursor_x ← (byte) 0 + [92] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y + [93] call cscroll to:cputln::@return cputln::@return: scope:[cputln] from cputln - [73] return + [94] return to:@return (void()) cscroll() cscroll: scope:[cscroll] from cputln - [74] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return + [95] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return to:cscroll::@1 cscroll::@1: scope:[cscroll] from cscroll cscroll::@5 - [75] (byte*) cscroll::line1#6 ← phi( cscroll/(const nomodify byte*) PPU_NAME_TABLE_0 cscroll::@5/(byte*) cscroll::line1#2 ) - [75] (byte*) cscroll::line2#6 ← phi( cscroll/(const nomodify byte*) PPU_NAME_TABLE_0+(byte) $20 cscroll::@5/(byte*) cscroll::line2#2 ) - [75] (byte) cscroll::y#2 ← phi( cscroll/(byte) 0 cscroll::@5/(byte) cscroll::y#1 ) - [76] if((byte) cscroll::y#2<(byte)(number) $1e-(number) 1) goto cscroll::@3 - to:cscroll::@2 -cscroll::@2: scope:[cscroll] from cscroll::@1 - [77] phi() - [78] call ppuDataFill + [96] (byte*) cscroll::line1#2 ← phi( cscroll/(const nomodify byte*) PPU_NAME_TABLE_0 cscroll::@5/(byte*) cscroll::line1#1 ) + [96] (byte*) cscroll::line2#2 ← phi( cscroll/(const nomodify byte*) PPU_NAME_TABLE_0+(byte) $20 cscroll::@5/(byte*) cscroll::line2#1 ) + [96] (byte) cscroll::y#2 ← phi( cscroll/(byte) 0 cscroll::@5/(byte) cscroll::y#1 ) + [97] if((byte) cscroll::y#2<(byte)(number) $1e-(number) 1) goto cscroll::@2 + to:cscroll::@3 +cscroll::@3: scope:[cscroll] from cscroll::@1 + [98] phi() + [99] call ppuDataFill to:cscroll::@6 -cscroll::@6: scope:[cscroll] from cscroll::@2 - [79] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $20 - [80] (byte) conio_cursor_y ← -- (byte) conio_cursor_y +cscroll::@6: scope:[cscroll] from cscroll::@3 + [100] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $20 + [101] (byte) conio_cursor_y ← -- (byte) conio_cursor_y to:cscroll::@return cscroll::@return: scope:[cscroll] from cscroll cscroll::@6 - [81] return + [102] return to:@return -cscroll::@3: scope:[cscroll] from cscroll::@1 cscroll::@8 - [82] (byte*) cscroll::line1#2 ← phi( cscroll::@8/(byte*) cscroll::line1#1 cscroll::@1/(byte*) cscroll::line1#6 ) - [82] (byte*) cscroll::line2#2 ← phi( cscroll::@8/(byte*) cscroll::line2#1 cscroll::@1/(byte*) cscroll::line2#6 ) - [82] (byte) cscroll::x#2 ← phi( cscroll::@8/(byte) cscroll::x#1 cscroll::@1/(byte) 0 ) - [83] if((byte) cscroll::x#2<(byte) $20) goto cscroll::@4 +cscroll::@2: scope:[cscroll] from cscroll::@1 + [103] (nomodify void*) ppuDataFetch::ppuData#0 ← (void*)(byte*) cscroll::line2#2 + [104] call ppuDataFetch + to:cscroll::@4 +cscroll::@4: scope:[cscroll] from cscroll::@2 + [105] (nomodify void*) ppuDataTransfer::ppuData#0 ← (void*)(byte*) cscroll::line1#2 + [106] call ppuDataTransfer to:cscroll::@5 -cscroll::@5: scope:[cscroll] from cscroll::@3 - [84] (byte) cscroll::y#1 ← ++ (byte) cscroll::y#2 +cscroll::@5: scope:[cscroll] from cscroll::@4 + [107] (byte*) cscroll::line1#1 ← (byte*) cscroll::line1#2 + (byte) $20 + [108] (byte*) cscroll::line2#1 ← (byte*) cscroll::line2#2 + (byte) $20 + [109] (byte) cscroll::y#1 ← ++ (byte) cscroll::y#2 to:cscroll::@1 -cscroll::@4: scope:[cscroll] from cscroll::@3 - [85] (nomodify void*) ppuDataGet::ppuData#0 ← (void*)(byte*) cscroll::line2#2 - [86] call ppuDataGet - [87] (byte) ppuDataGet::return#2 ← (byte) ppuDataGet::ppuDataRead1_return#0 - to:cscroll::@7 -cscroll::@7: scope:[cscroll] from cscroll::@4 - [88] (byte) cscroll::ch#0 ← (byte) ppuDataGet::return#2 - [89] (byte*) cscroll::line2#1 ← ++ (byte*) cscroll::line2#2 - [90] (nomodify void*) ppuDataSet::ppuData#1 ← (void*)(byte*) cscroll::line1#2 - [91] (byte) ppuDataSet::val#1 ← (byte) cscroll::ch#0 - [92] call ppuDataSet - to:cscroll::@8 -cscroll::@8: scope:[cscroll] from cscroll::@7 - [93] (byte*) cscroll::line1#1 ← ++ (byte*) cscroll::line1#2 - [94] (byte) cscroll::x#1 ← ++ (byte) cscroll::x#2 - to:cscroll::@3 - -(void()) ppuDataSet((nomodify void*) ppuDataSet::ppuData , (byte) ppuDataSet::val) -ppuDataSet: scope:[ppuDataSet] from cputc::@2 cscroll::@7 - [95] (byte) ppuDataSet::val#2 ← phi( cputc::@2/(byte) ppuDataSet::val#0 cscroll::@7/(byte) ppuDataSet::val#1 ) - [95] (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 ← phi( cputc::@2/(nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#2 cscroll::@7/(nomodify void*) ppuDataSet::ppuData#1 ) - to:ppuDataSet::ppuDataPrepare1 -ppuDataSet::ppuDataPrepare1: scope:[ppuDataSet] from ppuDataSet - [96] (byte~) ppuDataSet::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 - [97] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$0 - [98] (byte~) ppuDataSet::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 - [99] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$1 - to:ppuDataSet::ppuDataPut1 -ppuDataSet::ppuDataPut1: scope:[ppuDataSet] from ppuDataSet::ppuDataPrepare1 - [100] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataSet::val#2 - to:ppuDataSet::@return -ppuDataSet::@return: scope:[ppuDataSet] from ppuDataSet::ppuDataPut1 - [101] return - to:@return - -(byte()) ppuDataGet((nomodify void*) ppuDataGet::ppuData) -ppuDataGet: scope:[ppuDataGet] from cscroll::@4 - [102] phi() - to:ppuDataGet::ppuDataPrepare1 -ppuDataGet::ppuDataPrepare1: scope:[ppuDataGet] from ppuDataGet - [103] (byte~) ppuDataGet::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataGet::ppuData#0 - [104] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataGet::ppuDataPrepare1_$0 - [105] (byte~) ppuDataGet::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataGet::ppuData#0 - [106] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataGet::ppuDataPrepare1_$1 - to:ppuDataGet::ppuDataRead1 -ppuDataGet::ppuDataRead1: scope:[ppuDataGet] from ppuDataGet::ppuDataPrepare1 - [107] (byte) ppuDataGet::ppuDataRead1_return#0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) - to:ppuDataGet::@return -ppuDataGet::@return: scope:[ppuDataGet] from ppuDataGet::ppuDataRead1 - [108] return - to:@return - -(void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) -ppuDataFill: scope:[ppuDataFill] from clrscr cscroll::@2 main::@3 main::@4 - [109] (byte) ppuDataFill::val#10 ← phi( clrscr/(byte) ' ' cscroll::@2/(byte) ' ' main::@3/(byte) 0 main::@4/(byte) 0 ) - [109] (word) ppuDataFill::size#5 ← phi( clrscr/(word) $3c0 cscroll::@2/(byte) $20 main::@3/(byte) $40 main::@4/(byte) $40 ) - [109] (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ← phi( clrscr/(void*)(const nomodify byte*) PPU_NAME_TABLE_0 cscroll::@2/(void*)(const nomodify byte*) PPU_NAME_TABLE_0+(word)(number) $1e*(number) $20-(byte) $20 main::@3/(void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 main::@4/(void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_1 ) - to:ppuDataFill::ppuDataPrepare1 -ppuDataFill::ppuDataPrepare1: scope:[ppuDataFill] from ppuDataFill - [110] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 - [111] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 - [112] (byte~) ppuDataFill::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 - [113] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$1 - to:ppuDataFill::@1 -ppuDataFill::@1: scope:[ppuDataFill] from ppuDataFill::@2 ppuDataFill::ppuDataPrepare1 - [114] (word) ppuDataFill::i#2 ← phi( ppuDataFill::ppuDataPrepare1/(word) 0 ppuDataFill::@2/(word) ppuDataFill::i#1 ) - [115] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#5) goto ppuDataFill::ppuDataPut1 - to:ppuDataFill::@return -ppuDataFill::@return: scope:[ppuDataFill] from ppuDataFill::@1 - [116] return - to:@return -ppuDataFill::ppuDataPut1: scope:[ppuDataFill] from ppuDataFill::@1 - [117] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataFill::val#10 - to:ppuDataFill::@2 -ppuDataFill::@2: scope:[ppuDataFill] from ppuDataFill::ppuDataPut1 - [118] (word) ppuDataFill::i#1 ← ++ (word) ppuDataFill::i#2 - to:ppuDataFill::@1 - -(void()) clrscr() -clrscr: scope:[clrscr] from main::@5 - [119] phi() - [120] call ppuDataFill - to:clrscr::@1 -clrscr::@1: scope:[clrscr] from clrscr - [121] (byte) conio_cursor_x ← (byte) 0 - [122] (byte) conio_cursor_y ← (byte) 0 - [123] (byte*) conio_line_text ← (const nomodify byte*) PPU_NAME_TABLE_0 - to:clrscr::@return -clrscr::@return: scope:[clrscr] from clrscr::@1 - [124] return - to:@return (void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size) -ppuDataTransfer: scope:[ppuDataTransfer] from main::@2 - [125] phi() +ppuDataTransfer: scope:[ppuDataTransfer] from cscroll::@4 main::@6 + [110] (word) ppuDataTransfer::size#3 ← phi( cscroll::@4/(byte) $20 main::@6/(byte) $20*(const byte) SIZEOF_BYTE ) + [110] (nomodify void*) ppuDataTransfer::cpuData#2 ← phi( cscroll::@4/(void*)(const byte*) scroll_buffer main::@6/(void*)(const byte*) PALETTE ) + [110] (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 ← phi( cscroll::@4/(nomodify void*) ppuDataTransfer::ppuData#0 main::@6/(void*)(const nomodify byte*) PPU_PALETTE ) to:ppuDataTransfer::ppuDataPrepare1 ppuDataTransfer::ppuDataPrepare1: scope:[ppuDataTransfer] from ppuDataTransfer - [126] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← >(const nomodify void*) ppuDataTransfer::ppuData#0 - [127] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte) 0 + [111] (byte~) ppuDataTransfer::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 + [112] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$0 + [113] (byte~) ppuDataTransfer::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 + [114] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$1 + to:ppuDataTransfer::@3 +ppuDataTransfer::@3: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPrepare1 + [115] (byte*) ppuDataTransfer::cpuSrc#6 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 to:ppuDataTransfer::@1 -ppuDataTransfer::@1: scope:[ppuDataTransfer] from ppuDataTransfer::@3 ppuDataTransfer::ppuDataPrepare1 - [128] (byte*) ppuDataTransfer::cpuSrc#2 ← phi( ppuDataTransfer::ppuDataPrepare1/(byte*)(const nomodify void*) ppuDataTransfer::cpuData#0 ppuDataTransfer::@3/(byte*) ppuDataTransfer::cpuSrc#1 ) - [128] (word) ppuDataTransfer::i#2 ← phi( ppuDataTransfer::ppuDataPrepare1/(word) 0 ppuDataTransfer::@3/(word) ppuDataTransfer::i#1 ) - [129] if((word) ppuDataTransfer::i#2<(const word) ppuDataTransfer::size#0) goto ppuDataTransfer::@2 +ppuDataTransfer::@1: scope:[ppuDataTransfer] from ppuDataTransfer::@3 ppuDataTransfer::@4 + [116] (byte*) ppuDataTransfer::cpuSrc#2 ← phi( ppuDataTransfer::@3/(byte*) ppuDataTransfer::cpuSrc#6 ppuDataTransfer::@4/(byte*) ppuDataTransfer::cpuSrc#1 ) + [116] (word) ppuDataTransfer::i#2 ← phi( ppuDataTransfer::@3/(word) 0 ppuDataTransfer::@4/(word) ppuDataTransfer::i#1 ) + [117] if((word) ppuDataTransfer::i#2<(word) ppuDataTransfer::size#3) goto ppuDataTransfer::@2 to:ppuDataTransfer::@return ppuDataTransfer::@return: scope:[ppuDataTransfer] from ppuDataTransfer::@1 - [130] return + [118] return to:@return ppuDataTransfer::@2: scope:[ppuDataTransfer] from ppuDataTransfer::@1 - [131] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) + [119] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) to:ppuDataTransfer::ppuDataPut1 ppuDataTransfer::ppuDataPut1: scope:[ppuDataTransfer] from ppuDataTransfer::@2 - [132] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 - to:ppuDataTransfer::@3 -ppuDataTransfer::@3: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPut1 - [133] (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#2 - [134] (word) ppuDataTransfer::i#1 ← ++ (word) ppuDataTransfer::i#2 + [120] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 + to:ppuDataTransfer::@4 +ppuDataTransfer::@4: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPut1 + [121] (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#2 + [122] (word) ppuDataTransfer::i#1 ← ++ (word) ppuDataTransfer::i#2 to:ppuDataTransfer::@1 +(void()) ppuDataFetch((nomodify void*) ppuDataFetch::cpuData , (nomodify void*) ppuDataFetch::ppuData , (word) ppuDataFetch::size) +ppuDataFetch: scope:[ppuDataFetch] from cscroll::@2 + [123] phi() + to:ppuDataFetch::ppuDataPrepare1 +ppuDataFetch::ppuDataPrepare1: scope:[ppuDataFetch] from ppuDataFetch + [124] (byte~) ppuDataFetch::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFetch::ppuData#0 + [125] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFetch::ppuDataPrepare1_$0 + [126] (byte~) ppuDataFetch::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFetch::ppuData#0 + [127] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFetch::ppuDataPrepare1_$1 + to:ppuDataFetch::@2 +ppuDataFetch::@2: scope:[ppuDataFetch] from ppuDataFetch::ppuDataPrepare1 + asm { ldaPPU_PPUDATA } + to:ppuDataFetch::@1 +ppuDataFetch::@1: scope:[ppuDataFetch] from ppuDataFetch::@2 ppuDataFetch::@3 + [129] (byte*) ppuDataFetch::cpuDst#2 ← phi( ppuDataFetch::@2/(byte*)(const nomodify void*) ppuDataFetch::cpuData#0 ppuDataFetch::@3/(byte*) ppuDataFetch::cpuDst#1 ) + [129] (word) ppuDataFetch::i#2 ← phi( ppuDataFetch::@2/(word) 0 ppuDataFetch::@3/(word) ppuDataFetch::i#1 ) + [130] if((word) ppuDataFetch::i#2<(const word) ppuDataFetch::size#0) goto ppuDataFetch::ppuDataRead1 + to:ppuDataFetch::@return +ppuDataFetch::@return: scope:[ppuDataFetch] from ppuDataFetch::@1 + [131] return + to:@return +ppuDataFetch::ppuDataRead1: scope:[ppuDataFetch] from ppuDataFetch::@1 + [132] (byte) ppuDataFetch::ppuDataRead1_return#0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) + to:ppuDataFetch::@3 +ppuDataFetch::@3: scope:[ppuDataFetch] from ppuDataFetch::ppuDataRead1 + [133] *((byte*) ppuDataFetch::cpuDst#2) ← (byte) ppuDataFetch::ppuDataRead1_return#0 + [134] (byte*) ppuDataFetch::cpuDst#1 ← ++ (byte*) ppuDataFetch::cpuDst#2 + [135] (word) ppuDataFetch::i#1 ← ++ (word) ppuDataFetch::i#2 + to:ppuDataFetch::@1 + +(void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) +ppuDataFill: scope:[ppuDataFill] from clrscr cscroll::@3 main::@12 main::@13 + [136] (byte) ppuDataFill::val#10 ← phi( clrscr/(byte) ' ' cscroll::@3/(byte) ' ' main::@12/(byte) 0 main::@13/(byte) 0 ) + [136] (word) ppuDataFill::size#5 ← phi( clrscr/(word) $3c0 cscroll::@3/(byte) $20 main::@12/(byte) $40 main::@13/(byte) $40 ) + [136] (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ← phi( clrscr/(void*)(const nomodify byte*) PPU_NAME_TABLE_0 cscroll::@3/(void*)(const nomodify byte*) PPU_NAME_TABLE_0+(word)(number) $1e*(number) $20-(byte) $20 main::@12/(void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 main::@13/(void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_1 ) + to:ppuDataFill::ppuDataPrepare1 +ppuDataFill::ppuDataPrepare1: scope:[ppuDataFill] from ppuDataFill + [137] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 + [138] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 + [139] (byte~) ppuDataFill::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 + [140] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$1 + to:ppuDataFill::@1 +ppuDataFill::@1: scope:[ppuDataFill] from ppuDataFill::@2 ppuDataFill::ppuDataPrepare1 + [141] (word) ppuDataFill::i#2 ← phi( ppuDataFill::ppuDataPrepare1/(word) 0 ppuDataFill::@2/(word) ppuDataFill::i#1 ) + [142] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#5) goto ppuDataFill::ppuDataPut1 + to:ppuDataFill::@return +ppuDataFill::@return: scope:[ppuDataFill] from ppuDataFill::@1 + [143] return + to:@return +ppuDataFill::ppuDataPut1: scope:[ppuDataFill] from ppuDataFill::@1 + [144] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataFill::val#10 + to:ppuDataFill::@2 +ppuDataFill::@2: scope:[ppuDataFill] from ppuDataFill::ppuDataPut1 + [145] (word) ppuDataFill::i#1 ← ++ (word) ppuDataFill::i#2 + to:ppuDataFill::@1 + +(void()) ppuDataSet((nomodify void*) ppuDataSet::ppuData , (byte) ppuDataSet::val) +ppuDataSet: scope:[ppuDataSet] from cputc::@2 + [146] phi() + to:ppuDataSet::ppuDataPrepare1 +ppuDataSet::ppuDataPrepare1: scope:[ppuDataSet] from ppuDataSet + [147] (byte~) ppuDataSet::ppuDataPrepare1_$0 ← > (void*)(nomodify byte*) ppuDataSet::ppuData#0 + [148] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$0 + [149] (byte~) ppuDataSet::ppuDataPrepare1_$1 ← < (void*)(nomodify byte*) ppuDataSet::ppuData#0 + [150] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$1 + to:ppuDataSet::ppuDataPut1 +ppuDataSet::ppuDataPut1: scope:[ppuDataSet] from ppuDataSet::ppuDataPrepare1 + [151] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataSet::val#0 + to:ppuDataSet::@return +ppuDataSet::@return: scope:[ppuDataSet] from ppuDataSet::ppuDataPut1 + [152] return + to:@return + +(void()) gotoxy((byte) gotoxy::x , (byte) gotoxy::y) +gotoxy: scope:[gotoxy] from cputcxy cputsxy + [153] (byte) gotoxy::x#4 ← phi( cputcxy/(byte) gotoxy::x#2 cputsxy/(byte) gotoxy::x#3 ) + [153] (byte) gotoxy::y#4 ← phi( cputcxy/(byte) gotoxy::y#2 cputsxy/(byte) gotoxy::y#3 ) + [154] if((byte) gotoxy::y#4<(byte) $1e+(byte) 1) goto gotoxy::@3 + to:gotoxy::@1 +gotoxy::@3: scope:[gotoxy] from gotoxy + [155] phi() + to:gotoxy::@1 +gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@3 + [156] (byte) gotoxy::y#5 ← phi( gotoxy::@3/(byte) gotoxy::y#4 gotoxy/(byte) 0 ) + [157] if((byte) gotoxy::x#4<(byte) $20) goto gotoxy::@4 + to:gotoxy::@2 +gotoxy::@4: scope:[gotoxy] from gotoxy::@1 + [158] phi() + to:gotoxy::@2 +gotoxy::@2: scope:[gotoxy] from gotoxy::@1 gotoxy::@4 + [159] (byte) gotoxy::x#5 ← phi( gotoxy::@4/(byte) gotoxy::x#4 gotoxy::@1/(byte) 0 ) + [160] (byte) conio_cursor_x ← (byte) gotoxy::x#5 + [161] (byte) conio_cursor_y ← (byte) gotoxy::y#5 + [162] (word~) gotoxy::$6 ← (word)(byte) gotoxy::y#5 + [163] (word) gotoxy::line_offset#0 ← (word~) gotoxy::$6 << (byte) 5 + [164] (byte*~) gotoxy::$5 ← (const nomodify byte*) PPU_NAME_TABLE_0 + (word) gotoxy::line_offset#0 + [165] (byte*) conio_line_text ← (byte*~) gotoxy::$5 + to:gotoxy::@return +gotoxy::@return: scope:[gotoxy] from gotoxy::@2 + [166] return + to:@return + +(void()) cputsxy((byte) cputsxy::x , (byte) cputsxy::y , (to_nomodify byte*) cputsxy::s) +cputsxy: scope:[cputsxy] from main::@17 + [167] (byte) gotoxy::x#3 ← (byte) cputsxy::x#0 + [168] (byte) gotoxy::y#3 ← (byte) cputsxy::y#0 + [169] call gotoxy + to:cputsxy::@1 +cputsxy::@1: scope:[cputsxy] from cputsxy + [170] phi() + [171] call cputs + to:cputsxy::@return +cputsxy::@return: scope:[cputsxy] from cputsxy::@1 + [172] return + to:@return + +(void()) cputs((to_nomodify byte*) cputs::s) +cputs: scope:[cputs] from cputsxy::@1 + [173] phi() + to:cputs::@1 +cputs::@1: scope:[cputs] from cputs cputs::@2 + [174] (to_nomodify byte*) cputs::s#2 ← phi( cputs/(const byte*) num_buffer cputs::@2/(to_nomodify byte*) cputs::s#0 ) + [175] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#2) + [176] (to_nomodify byte*) cputs::s#0 ← ++ (to_nomodify byte*) cputs::s#2 + [177] if((byte) 0!=(byte) cputs::c#1) goto cputs::@2 + to:cputs::@return +cputs::@return: scope:[cputs] from cputs::@1 + [178] return + to:@return +cputs::@2: scope:[cputs] from cputs::@1 + [179] (byte) cputc::c#0 ← (byte) cputs::c#1 + [180] call cputc + to:cputs::@1 + +(void()) uctoa((byte) uctoa::value , (byte*) uctoa::buffer , (byte) uctoa::radix) +uctoa: scope:[uctoa] from main::@3 + [181] phi() + to:uctoa::@1 +uctoa::@1: scope:[uctoa] from uctoa uctoa::@4 + [182] (byte*) uctoa::buffer#11 ← phi( uctoa::@4/(byte*) uctoa::buffer#14 uctoa/(const byte*) num_buffer ) + [182] (byte) uctoa::started#2 ← phi( uctoa::@4/(byte) uctoa::started#4 uctoa/(byte) 0 ) + [182] (byte) uctoa::value#2 ← phi( uctoa::@4/(byte) uctoa::value#6 uctoa/(byte) uctoa::value#1 ) + [182] (byte) uctoa::digit#2 ← phi( uctoa::@4/(byte) uctoa::digit#1 uctoa/(byte) 0 ) + [183] if((byte) uctoa::digit#2<(const byte) uctoa::max_digits#2-(byte) 1) goto uctoa::@2 + to:uctoa::@3 +uctoa::@3: scope:[uctoa] from uctoa::@1 + [184] *((byte*) uctoa::buffer#11) ← *((const byte*) DIGITS + (byte) uctoa::value#2) + [185] (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#11 + [186] *((byte*) uctoa::buffer#3) ← (byte) 0 + to:uctoa::@return +uctoa::@return: scope:[uctoa] from uctoa::@3 + [187] return + to:@return +uctoa::@2: scope:[uctoa] from uctoa::@1 + [188] (byte) uctoa::digit_value#0 ← *((const byte*) RADIX_HEXADECIMAL_VALUES_CHAR + (byte) uctoa::digit#2) + [189] if((byte) 0!=(byte) uctoa::started#2) goto uctoa::@5 + to:uctoa::@7 +uctoa::@7: scope:[uctoa] from uctoa::@2 + [190] if((byte) uctoa::value#2>=(byte) uctoa::digit_value#0) goto uctoa::@5 + to:uctoa::@4 +uctoa::@4: scope:[uctoa] from uctoa::@6 uctoa::@7 + [191] (byte*) uctoa::buffer#14 ← phi( uctoa::@7/(byte*) uctoa::buffer#11 uctoa::@6/(byte*) uctoa::buffer#4 ) + [191] (byte) uctoa::started#4 ← phi( uctoa::@7/(byte) uctoa::started#2 uctoa::@6/(byte) 1 ) + [191] (byte) uctoa::value#6 ← phi( uctoa::@7/(byte) uctoa::value#2 uctoa::@6/(byte) uctoa::value#0 ) + [192] (byte) uctoa::digit#1 ← ++ (byte) uctoa::digit#2 + to:uctoa::@1 +uctoa::@5: scope:[uctoa] from uctoa::@2 uctoa::@7 + [193] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#11 + [194] (byte) uctoa_append::value#0 ← (byte) uctoa::value#2 + [195] (byte) uctoa_append::sub#0 ← (byte) uctoa::digit_value#0 + [196] call uctoa_append + [197] (byte) uctoa_append::return#0 ← (byte) uctoa_append::value#2 + to:uctoa::@6 +uctoa::@6: scope:[uctoa] from uctoa::@5 + [198] (byte) uctoa::value#0 ← (byte) uctoa_append::return#0 + [199] (byte*) uctoa::buffer#4 ← ++ (byte*) uctoa::buffer#11 + to:uctoa::@4 + +(byte()) uctoa_append((byte*) uctoa_append::buffer , (byte) uctoa_append::value , (byte) uctoa_append::sub) +uctoa_append: scope:[uctoa_append] from uctoa::@5 + [200] phi() + to:uctoa_append::@1 +uctoa_append::@1: scope:[uctoa_append] from uctoa_append uctoa_append::@2 + [201] (byte) uctoa_append::digit#2 ← phi( uctoa_append/(byte) 0 uctoa_append::@2/(byte) uctoa_append::digit#1 ) + [201] (byte) uctoa_append::value#2 ← phi( uctoa_append/(byte) uctoa_append::value#0 uctoa_append::@2/(byte) uctoa_append::value#1 ) + [202] if((byte) uctoa_append::value#2>=(byte) uctoa_append::sub#0) goto uctoa_append::@2 + to:uctoa_append::@3 +uctoa_append::@3: scope:[uctoa_append] from uctoa_append::@1 + [203] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2) + to:uctoa_append::@return +uctoa_append::@return: scope:[uctoa_append] from uctoa_append::@3 + [204] return + to:@return +uctoa_append::@2: scope:[uctoa_append] from uctoa_append::@1 + [205] (byte) uctoa_append::digit#1 ← ++ (byte) uctoa_append::digit#2 + [206] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0 + to:uctoa_append::@1 + +(void()) clrscr() +clrscr: scope:[clrscr] from main::@14 + [207] phi() + [208] call ppuDataFill + to:clrscr::@1 +clrscr::@1: scope:[clrscr] from clrscr + [209] (byte) conio_cursor_x ← (byte) 0 + [210] (byte) conio_cursor_y ← (byte) 0 + [211] (byte*) conio_line_text ← (const nomodify byte*) PPU_NAME_TABLE_0 + to:clrscr::@return +clrscr::@return: scope:[clrscr] from clrscr::@1 + [212] return + to:@return + interrupt(HARDWARE_STACK)(void()) vblank() vblank: scope:[vblank] from - [135] phi() - [136] call readJoy1 - [137] (byte) readJoy1::return#2 ← (byte) readJoy1::joy#2 + [213] phi() + [214] call readJoy1 + [215] (byte) readJoy1::return#2 ← (byte) readJoy1::joy#2 to:vblank::@11 vblank::@11: scope:[vblank] from vblank - [138] (byte) vblank::joy#0 ← (byte) readJoy1::return#2 - [139] (byte~) vblank::$1 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_DOWN - [140] if((byte) 0==(byte~) vblank::$1) goto vblank::@1 + [216] (byte) vblank::joy#0 ← (byte) readJoy1::return#2 + [217] (byte~) vblank::$1 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_DOWN + [218] if((byte) 0==(byte~) vblank::$1) goto vblank::@1 to:vblank::@5 vblank::@5: scope:[vblank] from vblank::@11 - [141] (volatile byte) y_scroll ← ++ (volatile byte) y_scroll - [142] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 + [219] (volatile byte) y_scroll ← ++ (volatile byte) y_scroll + [220] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 to:vblank::@6 vblank::@6: scope:[vblank] from vblank::@5 - [143] (volatile byte) y_scroll ← (byte) 0 + [221] (volatile byte) y_scroll ← (byte) 0 to:vblank::@1 vblank::@1: scope:[vblank] from vblank::@11 vblank::@5 vblank::@6 - [144] (byte~) vblank::$3 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_UP - [145] if((byte) 0==(byte~) vblank::$3) goto vblank::@2 + [222] (byte~) vblank::$3 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_UP + [223] if((byte) 0==(byte~) vblank::$3) goto vblank::@2 to:vblank::@7 vblank::@7: scope:[vblank] from vblank::@1 - [146] (volatile byte) y_scroll ← -- (volatile byte) y_scroll - [147] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 + [224] (volatile byte) y_scroll ← -- (volatile byte) y_scroll + [225] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 to:vblank::@8 vblank::@8: scope:[vblank] from vblank::@7 - [148] (volatile byte) y_scroll ← (byte) $ef + [226] (volatile byte) y_scroll ← (byte) $ef to:vblank::@2 vblank::@2: scope:[vblank] from vblank::@1 vblank::@7 vblank::@8 - [149] (byte~) vblank::$5 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_LEFT - [150] if((byte) 0==(byte~) vblank::$5) goto vblank::@3 + [227] (byte~) vblank::$5 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_LEFT + [228] if((byte) 0==(byte~) vblank::$5) goto vblank::@3 to:vblank::@9 vblank::@9: scope:[vblank] from vblank::@2 - [151] (volatile byte) x_scroll ← ++ (volatile byte) x_scroll + [229] (volatile byte) x_scroll ← ++ (volatile byte) x_scroll to:vblank::@3 vblank::@3: scope:[vblank] from vblank::@2 vblank::@9 - [152] (byte~) vblank::$7 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_RIGHT - [153] if((byte) 0==(byte~) vblank::$7) goto vblank::@4 + [230] (byte~) vblank::$7 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_RIGHT + [231] if((byte) 0==(byte~) vblank::$7) goto vblank::@4 to:vblank::@10 vblank::@10: scope:[vblank] from vblank::@3 - [154] (volatile byte) x_scroll ← -- (volatile byte) x_scroll + [232] (volatile byte) x_scroll ← -- (volatile byte) x_scroll to:vblank::@4 vblank::@4: scope:[vblank] from vblank::@10 vblank::@3 - [155] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) x_scroll - [156] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) y_scroll + [233] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) x_scroll + [234] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) y_scroll to:vblank::@return vblank::@return: scope:[vblank] from vblank::@4 - [157] return + [235] return to:@return (byte()) readJoy1() readJoy1: scope:[readJoy1] from vblank - [158] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 1 - [159] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 0 + [236] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 1 + [237] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 0 to:readJoy1::@1 readJoy1::@1: scope:[readJoy1] from readJoy1 readJoy1::@2 - [160] (byte) readJoy1::joy#2 ← phi( readJoy1/(byte) 0 readJoy1::@2/(byte) readJoy1::joy#1 ) - [160] (byte) readJoy1::i#2 ← phi( readJoy1/(byte) 0 readJoy1::@2/(byte) readJoy1::i#1 ) - [161] if((byte) readJoy1::i#2<(byte) 8) goto readJoy1::@2 + [238] (byte) readJoy1::joy#2 ← phi( readJoy1/(byte) 0 readJoy1::@2/(byte) readJoy1::joy#1 ) + [238] (byte) readJoy1::i#2 ← phi( readJoy1/(byte) 0 readJoy1::@2/(byte) readJoy1::i#1 ) + [239] if((byte) readJoy1::i#2<(byte) 8) goto readJoy1::@2 to:readJoy1::@return readJoy1::@return: scope:[readJoy1] from readJoy1::@1 - [162] return + [240] return to:@return readJoy1::@2: scope:[readJoy1] from readJoy1::@1 - [163] (byte~) readJoy1::$1 ← (byte) readJoy1::joy#2 << (byte) 1 - [164] (byte~) readJoy1::$2 ← *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) & (byte) 1 - [165] (byte) readJoy1::joy#1 ← (byte~) readJoy1::$1 | (byte~) readJoy1::$2 - [166] (byte) readJoy1::i#1 ← ++ (byte) readJoy1::i#2 + [241] (byte~) readJoy1::$1 ← (byte) readJoy1::joy#2 << (byte) 1 + [242] (byte~) readJoy1::$2 ← *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) & (byte) 1 + [243] (byte) readJoy1::joy#1 ← (byte~) readJoy1::$1 | (byte~) readJoy1::$2 + [244] (byte) readJoy1::i#1 ← ++ (byte) readJoy1::i#2 to:readJoy1::@1 diff --git a/src/test/ref/examples/nes-conio/nes-conio.log b/src/test/ref/examples/nes-conio/nes-conio.log index f7b4d4bca..838ced89d 100644 --- a/src/test/ref/examples/nes-conio/nes-conio.log +++ b/src/test/ref/examples/nes-conio/nes-conio.log @@ -1,7 +1,13 @@ +Resolved forward reference scroll_buffer to (const byte*) scroll_buffer +Resolved forward reference scroll_buffer to (const byte*) scroll_buffer Resolved forward reference PALETTE to (const byte*) PALETTE Resolved forward reference PALETTE to (const byte*) PALETTE Resolved forward reference x_scroll to (volatile byte) x_scroll Resolved forward reference y_scroll to (volatile byte) y_scroll +Fixing struct type size struct printf_buffer_number to 12 +Fixing struct type size struct printf_buffer_number to 12 +Fixing struct type SIZE_OF struct printf_buffer_number to 12 +Fixing struct type SIZE_OF struct printf_buffer_number to 12 Inlined call call disableVideoOutput Inlined call call disableAudioOutput Inlined call call clearVBlankFlag @@ -11,6 +17,8 @@ Inlined call call ppuDataPrepare (nomodify void*) ppuDataFill::ppuData Inlined call call ppuDataPut (byte) ppuDataFill::val Inlined call call ppuDataPrepare (nomodify void*) ppuDataTransfer::ppuData Inlined call call ppuDataPut *((byte*) ppuDataTransfer::cpuSrc) +Inlined call call ppuDataPrepare (nomodify void*) ppuDataFetch::ppuData +Inlined call (byte~) ppuDataFetch::$2 ← call ppuDataRead Inlined call call ppuDataPrepare (nomodify void*) ppuDataPutTile::ppuData Inlined call call ppuDataPut *((byte*) ppuDataPutTile::tile + (number) 0) Inlined call call ppuDataPut *((byte*) ppuDataPutTile::tile + (number) 1) @@ -22,7 +30,13 @@ Inlined call call ppuDataPut (byte) ppuDataSet::val Inlined call call ppuDataPrepare (nomodify void*) ppuDataGet::ppuData Inlined call (byte~) ppuDataGet::$1 ← call ppuDataRead Inlined call call initNES +Inlined call (byte~) main::$7 ← call screensizex +Inlined call (byte~) main::$11 ← call screensizey +Inlined call (byte~) main::$14 ← call screensizey +Inlined call (byte~) main::$18 ← call screensizex +Inlined call (byte~) main::$21 ← call screensizey Inlined call call enableVideoOutput +Eliminating unused variable with no statement (struct printf_buffer_number) printf_buffer CONTROL FLOW GRAPH SSA @begin: scope:[] from @@ -67,10 +81,10 @@ readJoy1::@return: scope:[readJoy1] from readJoy1::@3 to:@return (void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) -ppuDataFill: scope:[ppuDataFill] from clrscr cscroll::@6 main::@3 main::@4 - (byte) ppuDataFill::val#10 ← phi( clrscr/(byte) ppuDataFill::val#0 cscroll::@6/(byte) ppuDataFill::val#1 main::@3/(byte) ppuDataFill::val#2 main::@4/(byte) ppuDataFill::val#3 ) - (word) ppuDataFill::size#9 ← phi( clrscr/(word) ppuDataFill::size#0 cscroll::@6/(word) ppuDataFill::size#1 main::@3/(word) ppuDataFill::size#2 main::@4/(word) ppuDataFill::size#3 ) - (nomodify void*) ppuDataFill::ppuData#4 ← phi( clrscr/(nomodify void*) ppuDataFill::ppuData#0 cscroll::@6/(nomodify void*) ppuDataFill::ppuData#1 main::@3/(nomodify void*) ppuDataFill::ppuData#2 main::@4/(nomodify void*) ppuDataFill::ppuData#3 ) +ppuDataFill: scope:[ppuDataFill] from clrscr cscroll::@6 main::@14 main::@15 + (byte) ppuDataFill::val#10 ← phi( clrscr/(byte) ppuDataFill::val#0 cscroll::@6/(byte) ppuDataFill::val#1 main::@14/(byte) ppuDataFill::val#2 main::@15/(byte) ppuDataFill::val#3 ) + (word) ppuDataFill::size#9 ← phi( clrscr/(word) ppuDataFill::size#0 cscroll::@6/(word) ppuDataFill::size#1 main::@14/(word) ppuDataFill::size#2 main::@15/(word) ppuDataFill::size#3 ) + (nomodify void*) ppuDataFill::ppuData#4 ← phi( clrscr/(nomodify void*) ppuDataFill::ppuData#0 cscroll::@6/(nomodify void*) ppuDataFill::ppuData#1 main::@14/(nomodify void*) ppuDataFill::ppuData#2 main::@15/(nomodify void*) ppuDataFill::ppuData#3 ) (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ← (nomodify void*) ppuDataFill::ppuData#4 to:ppuDataFill::ppuDataPrepare1 ppuDataFill::ppuDataPrepare1: scope:[ppuDataFill] from ppuDataFill @@ -124,15 +138,15 @@ ppuDataFill::@return: scope:[ppuDataFill] from ppuDataFill::@1 to:@return (void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size) -ppuDataTransfer: scope:[ppuDataTransfer] from main::@2 - (word) ppuDataTransfer::size#6 ← phi( main::@2/(word) ppuDataTransfer::size#0 ) - (nomodify void*) ppuDataTransfer::cpuData#3 ← phi( main::@2/(nomodify void*) ppuDataTransfer::cpuData#0 ) - (nomodify void*) ppuDataTransfer::ppuData#1 ← phi( main::@2/(nomodify void*) ppuDataTransfer::ppuData#0 ) - (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 ← (nomodify void*) ppuDataTransfer::ppuData#1 +ppuDataTransfer: scope:[ppuDataTransfer] from cscroll::@8 main::@8 + (word) ppuDataTransfer::size#7 ← phi( cscroll::@8/(word) ppuDataTransfer::size#0 main::@8/(word) ppuDataTransfer::size#1 ) + (nomodify void*) ppuDataTransfer::cpuData#4 ← phi( cscroll::@8/(nomodify void*) ppuDataTransfer::cpuData#0 main::@8/(nomodify void*) ppuDataTransfer::cpuData#1 ) + (nomodify void*) ppuDataTransfer::ppuData#2 ← phi( cscroll::@8/(nomodify void*) ppuDataTransfer::ppuData#0 main::@8/(nomodify void*) ppuDataTransfer::ppuData#1 ) + (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 ← (nomodify void*) ppuDataTransfer::ppuData#2 to:ppuDataTransfer::ppuDataPrepare1 ppuDataTransfer::ppuDataPrepare1: scope:[ppuDataTransfer] from ppuDataTransfer - (word) ppuDataTransfer::size#4 ← phi( ppuDataTransfer/(word) ppuDataTransfer::size#6 ) - (nomodify void*) ppuDataTransfer::cpuData#2 ← phi( ppuDataTransfer/(nomodify void*) ppuDataTransfer::cpuData#3 ) + (word) ppuDataTransfer::size#5 ← phi( ppuDataTransfer/(word) ppuDataTransfer::size#7 ) + (nomodify void*) ppuDataTransfer::cpuData#3 ← phi( ppuDataTransfer/(nomodify void*) ppuDataTransfer::cpuData#4 ) (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#1 ← phi( ppuDataTransfer/(nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 ) (byte~) ppuDataTransfer::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#1 (byte*~) ppuDataTransfer::ppuDataPrepare1_$4 ← (byte*)(const struct RICOH_2C02*) PPU @@ -144,26 +158,26 @@ ppuDataTransfer::ppuDataPrepare1: scope:[ppuDataTransfer] from ppuDataTransfer *((byte*~) ppuDataTransfer::ppuDataPrepare1_$3) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$1 to:ppuDataTransfer::@3 ppuDataTransfer::@3: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPrepare1 - (word) ppuDataTransfer::size#2 ← phi( ppuDataTransfer::ppuDataPrepare1/(word) ppuDataTransfer::size#4 ) - (nomodify void*) ppuDataTransfer::cpuData#1 ← phi( ppuDataTransfer::ppuDataPrepare1/(nomodify void*) ppuDataTransfer::cpuData#2 ) - (byte*) ppuDataTransfer::cpuSrc#0 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#1 + (word) ppuDataTransfer::size#3 ← phi( ppuDataTransfer::ppuDataPrepare1/(word) ppuDataTransfer::size#5 ) + (nomodify void*) ppuDataTransfer::cpuData#2 ← phi( ppuDataTransfer::ppuDataPrepare1/(nomodify void*) ppuDataTransfer::cpuData#3 ) + (byte*) ppuDataTransfer::cpuSrc#0 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 (word) ppuDataTransfer::i#0 ← (word) 0 to:ppuDataTransfer::@1 ppuDataTransfer::@1: scope:[ppuDataTransfer] from ppuDataTransfer::@3 ppuDataTransfer::@4 (byte*) ppuDataTransfer::cpuSrc#4 ← phi( ppuDataTransfer::@3/(byte*) ppuDataTransfer::cpuSrc#0 ppuDataTransfer::@4/(byte*) ppuDataTransfer::cpuSrc#1 ) - (word) ppuDataTransfer::size#1 ← phi( ppuDataTransfer::@3/(word) ppuDataTransfer::size#2 ppuDataTransfer::@4/(word) ppuDataTransfer::size#3 ) + (word) ppuDataTransfer::size#2 ← phi( ppuDataTransfer::@3/(word) ppuDataTransfer::size#3 ppuDataTransfer::@4/(word) ppuDataTransfer::size#4 ) (word) ppuDataTransfer::i#2 ← phi( ppuDataTransfer::@3/(word) ppuDataTransfer::i#0 ppuDataTransfer::@4/(word) ppuDataTransfer::i#1 ) - (bool~) ppuDataTransfer::$1 ← (word) ppuDataTransfer::i#2 < (word) ppuDataTransfer::size#1 + (bool~) ppuDataTransfer::$1 ← (word) ppuDataTransfer::i#2 < (word) ppuDataTransfer::size#2 if((bool~) ppuDataTransfer::$1) goto ppuDataTransfer::@2 to:ppuDataTransfer::@return ppuDataTransfer::@2: scope:[ppuDataTransfer] from ppuDataTransfer::@1 - (word) ppuDataTransfer::size#7 ← phi( ppuDataTransfer::@1/(word) ppuDataTransfer::size#1 ) + (word) ppuDataTransfer::size#8 ← phi( ppuDataTransfer::@1/(word) ppuDataTransfer::size#2 ) (word) ppuDataTransfer::i#5 ← phi( ppuDataTransfer::@1/(word) ppuDataTransfer::i#2 ) (byte*) ppuDataTransfer::cpuSrc#2 ← phi( ppuDataTransfer::@1/(byte*) ppuDataTransfer::cpuSrc#4 ) (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) to:ppuDataTransfer::ppuDataPut1 ppuDataTransfer::ppuDataPut1: scope:[ppuDataTransfer] from ppuDataTransfer::@2 - (word) ppuDataTransfer::size#5 ← phi( ppuDataTransfer::@2/(word) ppuDataTransfer::size#7 ) + (word) ppuDataTransfer::size#6 ← phi( ppuDataTransfer::@2/(word) ppuDataTransfer::size#8 ) (word) ppuDataTransfer::i#4 ← phi( ppuDataTransfer::@2/(word) ppuDataTransfer::i#5 ) (byte*) ppuDataTransfer::cpuSrc#5 ← phi( ppuDataTransfer::@2/(byte*) ppuDataTransfer::cpuSrc#2 ) (byte) ppuDataTransfer::ppuDataPut1_val#1 ← phi( ppuDataTransfer::@2/(byte) ppuDataTransfer::ppuDataPut1_val#0 ) @@ -172,7 +186,7 @@ ppuDataTransfer::ppuDataPut1: scope:[ppuDataTransfer] from ppuDataTransfer::@2 *((byte*~) ppuDataTransfer::ppuDataPut1_$0) ← (byte) ppuDataTransfer::ppuDataPut1_val#1 to:ppuDataTransfer::@4 ppuDataTransfer::@4: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPut1 - (word) ppuDataTransfer::size#3 ← phi( ppuDataTransfer::ppuDataPut1/(word) ppuDataTransfer::size#5 ) + (word) ppuDataTransfer::size#4 ← phi( ppuDataTransfer::ppuDataPut1/(word) ppuDataTransfer::size#6 ) (word) ppuDataTransfer::i#3 ← phi( ppuDataTransfer::ppuDataPut1/(word) ppuDataTransfer::i#4 ) (byte*) ppuDataTransfer::cpuSrc#3 ← phi( ppuDataTransfer::ppuDataPut1/(byte*) ppuDataTransfer::cpuSrc#5 ) (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#3 @@ -182,14 +196,77 @@ ppuDataTransfer::@return: scope:[ppuDataTransfer] from ppuDataTransfer::@1 return to:@return +(void()) ppuDataFetch((nomodify void*) ppuDataFetch::cpuData , (nomodify void*) ppuDataFetch::ppuData , (word) ppuDataFetch::size) +ppuDataFetch: scope:[ppuDataFetch] from cscroll::@5 + (word) ppuDataFetch::size#6 ← phi( cscroll::@5/(word) ppuDataFetch::size#0 ) + (nomodify void*) ppuDataFetch::cpuData#3 ← phi( cscroll::@5/(nomodify void*) ppuDataFetch::cpuData#0 ) + (nomodify void*) ppuDataFetch::ppuData#1 ← phi( cscroll::@5/(nomodify void*) ppuDataFetch::ppuData#0 ) + (nomodify void*) ppuDataFetch::ppuDataPrepare1_ppuData#0 ← (nomodify void*) ppuDataFetch::ppuData#1 + to:ppuDataFetch::ppuDataPrepare1 +ppuDataFetch::ppuDataPrepare1: scope:[ppuDataFetch] from ppuDataFetch + (word) ppuDataFetch::size#4 ← phi( ppuDataFetch/(word) ppuDataFetch::size#6 ) + (nomodify void*) ppuDataFetch::cpuData#2 ← phi( ppuDataFetch/(nomodify void*) ppuDataFetch::cpuData#3 ) + (nomodify void*) ppuDataFetch::ppuDataPrepare1_ppuData#1 ← phi( ppuDataFetch/(nomodify void*) ppuDataFetch::ppuDataPrepare1_ppuData#0 ) + (byte~) ppuDataFetch::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFetch::ppuDataPrepare1_ppuData#1 + (byte*~) ppuDataFetch::ppuDataPrepare1_$4 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) ppuDataFetch::ppuDataPrepare1_$2 ← (byte*~) ppuDataFetch::ppuDataPrepare1_$4 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR + *((byte*~) ppuDataFetch::ppuDataPrepare1_$2) ← (byte~) ppuDataFetch::ppuDataPrepare1_$0 + (byte~) ppuDataFetch::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFetch::ppuDataPrepare1_ppuData#1 + (byte*~) ppuDataFetch::ppuDataPrepare1_$5 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) ppuDataFetch::ppuDataPrepare1_$3 ← (byte*~) ppuDataFetch::ppuDataPrepare1_$5 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR + *((byte*~) ppuDataFetch::ppuDataPrepare1_$3) ← (byte~) ppuDataFetch::ppuDataPrepare1_$1 + to:ppuDataFetch::@2 +ppuDataFetch::@2: scope:[ppuDataFetch] from ppuDataFetch::ppuDataPrepare1 + (word) ppuDataFetch::size#2 ← phi( ppuDataFetch::ppuDataPrepare1/(word) ppuDataFetch::size#4 ) + (nomodify void*) ppuDataFetch::cpuData#1 ← phi( ppuDataFetch::ppuDataPrepare1/(nomodify void*) ppuDataFetch::cpuData#2 ) + asm { ldaPPU_PPUDATA } + (byte*) ppuDataFetch::cpuDst#0 ← (byte*)(nomodify void*) ppuDataFetch::cpuData#1 + (word) ppuDataFetch::i#0 ← (word) 0 + to:ppuDataFetch::@1 +ppuDataFetch::@1: scope:[ppuDataFetch] from ppuDataFetch::@2 ppuDataFetch::@3 + (byte*) ppuDataFetch::cpuDst#5 ← phi( ppuDataFetch::@2/(byte*) ppuDataFetch::cpuDst#0 ppuDataFetch::@3/(byte*) ppuDataFetch::cpuDst#1 ) + (word) ppuDataFetch::size#1 ← phi( ppuDataFetch::@2/(word) ppuDataFetch::size#2 ppuDataFetch::@3/(word) ppuDataFetch::size#3 ) + (word) ppuDataFetch::i#2 ← phi( ppuDataFetch::@2/(word) ppuDataFetch::i#0 ppuDataFetch::@3/(word) ppuDataFetch::i#1 ) + (bool~) ppuDataFetch::$1 ← (word) ppuDataFetch::i#2 < (word) ppuDataFetch::size#1 + if((bool~) ppuDataFetch::$1) goto ppuDataFetch::ppuDataRead1 + to:ppuDataFetch::@return +ppuDataFetch::ppuDataRead1: scope:[ppuDataFetch] from ppuDataFetch::@1 + (word) ppuDataFetch::size#7 ← phi( ppuDataFetch::@1/(word) ppuDataFetch::size#1 ) + (word) ppuDataFetch::i#5 ← phi( ppuDataFetch::@1/(word) ppuDataFetch::i#2 ) + (byte*) ppuDataFetch::cpuDst#4 ← phi( ppuDataFetch::@1/(byte*) ppuDataFetch::cpuDst#5 ) + (byte*~) ppuDataFetch::ppuDataRead1_$1 ← (byte*)(const struct RICOH_2C02*) PPU + (byte*~) ppuDataFetch::ppuDataRead1_$0 ← (byte*~) ppuDataFetch::ppuDataRead1_$1 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA + (byte) ppuDataFetch::ppuDataRead1_return#0 ← *((byte*~) ppuDataFetch::ppuDataRead1_$0) + to:ppuDataFetch::ppuDataRead1_@return +ppuDataFetch::ppuDataRead1_@return: scope:[ppuDataFetch] from ppuDataFetch::ppuDataRead1 + (word) ppuDataFetch::size#5 ← phi( ppuDataFetch::ppuDataRead1/(word) ppuDataFetch::size#7 ) + (word) ppuDataFetch::i#4 ← phi( ppuDataFetch::ppuDataRead1/(word) ppuDataFetch::i#5 ) + (byte*) ppuDataFetch::cpuDst#3 ← phi( ppuDataFetch::ppuDataRead1/(byte*) ppuDataFetch::cpuDst#4 ) + (byte) ppuDataFetch::ppuDataRead1_return#2 ← phi( ppuDataFetch::ppuDataRead1/(byte) ppuDataFetch::ppuDataRead1_return#0 ) + (byte) ppuDataFetch::ppuDataRead1_return#1 ← (byte) ppuDataFetch::ppuDataRead1_return#2 + to:ppuDataFetch::@3 +ppuDataFetch::@3: scope:[ppuDataFetch] from ppuDataFetch::ppuDataRead1_@return + (word) ppuDataFetch::size#3 ← phi( ppuDataFetch::ppuDataRead1_@return/(word) ppuDataFetch::size#5 ) + (word) ppuDataFetch::i#3 ← phi( ppuDataFetch::ppuDataRead1_@return/(word) ppuDataFetch::i#4 ) + (byte*) ppuDataFetch::cpuDst#2 ← phi( ppuDataFetch::ppuDataRead1_@return/(byte*) ppuDataFetch::cpuDst#3 ) + (byte) ppuDataFetch::ppuDataRead1_return#3 ← phi( ppuDataFetch::ppuDataRead1_@return/(byte) ppuDataFetch::ppuDataRead1_return#1 ) + (byte~) ppuDataFetch::$2 ← (byte) ppuDataFetch::ppuDataRead1_return#3 + *((byte*) ppuDataFetch::cpuDst#2) ← (byte~) ppuDataFetch::$2 + (byte*) ppuDataFetch::cpuDst#1 ← ++ (byte*) ppuDataFetch::cpuDst#2 + (word) ppuDataFetch::i#1 ← ++ (word) ppuDataFetch::i#3 + to:ppuDataFetch::@1 +ppuDataFetch::@return: scope:[ppuDataFetch] from ppuDataFetch::@1 + return + to:@return + (void()) ppuDataSet((nomodify void*) ppuDataSet::ppuData , (byte) ppuDataSet::val) -ppuDataSet: scope:[ppuDataSet] from cputc::@2 cscroll::@12 - (byte) ppuDataSet::val#4 ← phi( cputc::@2/(byte) ppuDataSet::val#0 cscroll::@12/(byte) ppuDataSet::val#1 ) - (nomodify void*) ppuDataSet::ppuData#2 ← phi( cputc::@2/(nomodify void*) ppuDataSet::ppuData#0 cscroll::@12/(nomodify void*) ppuDataSet::ppuData#1 ) - (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 ← (nomodify void*) ppuDataSet::ppuData#2 +ppuDataSet: scope:[ppuDataSet] from cputc::@2 + (byte) ppuDataSet::val#3 ← phi( cputc::@2/(byte) ppuDataSet::val#0 ) + (nomodify void*) ppuDataSet::ppuData#1 ← phi( cputc::@2/(nomodify void*) ppuDataSet::ppuData#0 ) + (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 ← (nomodify void*) ppuDataSet::ppuData#1 to:ppuDataSet::ppuDataPrepare1 ppuDataSet::ppuDataPrepare1: scope:[ppuDataSet] from ppuDataSet - (byte) ppuDataSet::val#3 ← phi( ppuDataSet/(byte) ppuDataSet::val#4 ) + (byte) ppuDataSet::val#2 ← phi( ppuDataSet/(byte) ppuDataSet::val#3 ) (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#1 ← phi( ppuDataSet/(nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 ) (byte~) ppuDataSet::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#1 (byte*~) ppuDataSet::ppuDataPrepare1_$4 ← (byte*)(const struct RICOH_2C02*) PPU @@ -201,8 +278,8 @@ ppuDataSet::ppuDataPrepare1: scope:[ppuDataSet] from ppuDataSet *((byte*~) ppuDataSet::ppuDataPrepare1_$3) ← (byte~) ppuDataSet::ppuDataPrepare1_$1 to:ppuDataSet::@1 ppuDataSet::@1: scope:[ppuDataSet] from ppuDataSet::ppuDataPrepare1 - (byte) ppuDataSet::val#2 ← phi( ppuDataSet::ppuDataPrepare1/(byte) ppuDataSet::val#3 ) - (byte) ppuDataSet::ppuDataPut1_val#0 ← (byte) ppuDataSet::val#2 + (byte) ppuDataSet::val#1 ← phi( ppuDataSet::ppuDataPrepare1/(byte) ppuDataSet::val#2 ) + (byte) ppuDataSet::ppuDataPut1_val#0 ← (byte) ppuDataSet::val#1 to:ppuDataSet::ppuDataPut1 ppuDataSet::ppuDataPut1: scope:[ppuDataSet] from ppuDataSet::@1 (byte) ppuDataSet::ppuDataPut1_val#1 ← phi( ppuDataSet::@1/(byte) ppuDataSet::ppuDataPut1_val#0 ) @@ -213,42 +290,6 @@ ppuDataSet::ppuDataPut1: scope:[ppuDataSet] from ppuDataSet::@1 ppuDataSet::@return: scope:[ppuDataSet] from ppuDataSet::ppuDataPut1 return to:@return - -(byte()) ppuDataGet((nomodify void*) ppuDataGet::ppuData) -ppuDataGet: scope:[ppuDataGet] from cscroll::@8 - (nomodify void*) ppuDataGet::ppuData#1 ← phi( cscroll::@8/(nomodify void*) ppuDataGet::ppuData#0 ) - (nomodify void*) ppuDataGet::ppuDataPrepare1_ppuData#0 ← (nomodify void*) ppuDataGet::ppuData#1 - to:ppuDataGet::ppuDataPrepare1 -ppuDataGet::ppuDataPrepare1: scope:[ppuDataGet] from ppuDataGet - (nomodify void*) ppuDataGet::ppuDataPrepare1_ppuData#1 ← phi( ppuDataGet/(nomodify void*) ppuDataGet::ppuDataPrepare1_ppuData#0 ) - (byte~) ppuDataGet::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataGet::ppuDataPrepare1_ppuData#1 - (byte*~) ppuDataGet::ppuDataPrepare1_$4 ← (byte*)(const struct RICOH_2C02*) PPU - (byte*~) ppuDataGet::ppuDataPrepare1_$2 ← (byte*~) ppuDataGet::ppuDataPrepare1_$4 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR - *((byte*~) ppuDataGet::ppuDataPrepare1_$2) ← (byte~) ppuDataGet::ppuDataPrepare1_$0 - (byte~) ppuDataGet::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataGet::ppuDataPrepare1_ppuData#1 - (byte*~) ppuDataGet::ppuDataPrepare1_$5 ← (byte*)(const struct RICOH_2C02*) PPU - (byte*~) ppuDataGet::ppuDataPrepare1_$3 ← (byte*~) ppuDataGet::ppuDataPrepare1_$5 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR - *((byte*~) ppuDataGet::ppuDataPrepare1_$3) ← (byte~) ppuDataGet::ppuDataPrepare1_$1 - to:ppuDataGet::ppuDataRead1 -ppuDataGet::ppuDataRead1: scope:[ppuDataGet] from ppuDataGet::ppuDataPrepare1 - (byte*~) ppuDataGet::ppuDataRead1_$1 ← (byte*)(const struct RICOH_2C02*) PPU - (byte*~) ppuDataGet::ppuDataRead1_$0 ← (byte*~) ppuDataGet::ppuDataRead1_$1 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA - (byte) ppuDataGet::ppuDataRead1_return#0 ← *((byte*~) ppuDataGet::ppuDataRead1_$0) - to:ppuDataGet::ppuDataRead1_@return -ppuDataGet::ppuDataRead1_@return: scope:[ppuDataGet] from ppuDataGet::ppuDataRead1 - (byte) ppuDataGet::ppuDataRead1_return#2 ← phi( ppuDataGet::ppuDataRead1/(byte) ppuDataGet::ppuDataRead1_return#0 ) - (byte) ppuDataGet::ppuDataRead1_return#1 ← (byte) ppuDataGet::ppuDataRead1_return#2 - to:ppuDataGet::@1 -ppuDataGet::@1: scope:[ppuDataGet] from ppuDataGet::ppuDataRead1_@return - (byte) ppuDataGet::ppuDataRead1_return#3 ← phi( ppuDataGet::ppuDataRead1_@return/(byte) ppuDataGet::ppuDataRead1_return#1 ) - (byte~) ppuDataGet::$1 ← (byte) ppuDataGet::ppuDataRead1_return#3 - (byte) ppuDataGet::return#0 ← (byte~) ppuDataGet::$1 - to:ppuDataGet::@return -ppuDataGet::@return: scope:[ppuDataGet] from ppuDataGet::@1 - (byte) ppuDataGet::return#3 ← phi( ppuDataGet::@1/(byte) ppuDataGet::return#0 ) - (byte) ppuDataGet::return#1 ← (byte) ppuDataGet::return#3 - return - to:@return @1: scope:[] from @begin (byte) conio_cursor_x ← (byte) 0 (byte) conio_cursor_y ← (byte) 0 @@ -257,7 +298,7 @@ ppuDataGet::@return: scope:[ppuDataGet] from ppuDataGet::@1 to:@2 (void()) clrscr() -clrscr: scope:[clrscr] from main::@5 +clrscr: scope:[clrscr] from main::@16 (nomodify void*) ppuDataFill::ppuData#0 ← (void*)(const nomodify byte*) CONIO_SCREEN_TEXT (byte) ppuDataFill::val#0 ← (byte) ' ' (word) ppuDataFill::size#0 ← (number) $3c0 @@ -273,37 +314,37 @@ clrscr::@return: scope:[clrscr] from clrscr::@1 to:@return (void()) gotoxy((byte) gotoxy::x , (byte) gotoxy::y) -gotoxy: scope:[gotoxy] from cscroll::@2 - (byte) gotoxy::x#4 ← phi( cscroll::@2/(byte) gotoxy::x#1 ) - (byte) gotoxy::y#2 ← phi( cscroll::@2/(byte) gotoxy::y#1 ) - (bool~) gotoxy::$0 ← (byte) gotoxy::y#2 > (number) $1e +gotoxy: scope:[gotoxy] from cputcxy cputsxy cscroll::@2 + (byte) gotoxy::x#6 ← phi( cputcxy/(byte) gotoxy::x#2 cputsxy/(byte) gotoxy::x#3 cscroll::@2/(byte) gotoxy::x#1 ) + (byte) gotoxy::y#4 ← phi( cputcxy/(byte) gotoxy::y#2 cputsxy/(byte) gotoxy::y#3 cscroll::@2/(byte) gotoxy::y#1 ) + (bool~) gotoxy::$0 ← (byte) gotoxy::y#4 > (number) $1e (bool~) gotoxy::$1 ← ! (bool~) gotoxy::$0 if((bool~) gotoxy::$1) goto gotoxy::@1 to:gotoxy::@3 gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@3 - (byte) gotoxy::y#4 ← phi( gotoxy/(byte) gotoxy::y#2 gotoxy::@3/(byte) gotoxy::y#0 ) - (byte) gotoxy::x#2 ← phi( gotoxy/(byte) gotoxy::x#4 gotoxy::@3/(byte) gotoxy::x#5 ) - (bool~) gotoxy::$2 ← (byte) gotoxy::x#2 >= (number) $20 + (byte) gotoxy::y#6 ← phi( gotoxy/(byte) gotoxy::y#4 gotoxy::@3/(byte) gotoxy::y#0 ) + (byte) gotoxy::x#4 ← phi( gotoxy/(byte) gotoxy::x#6 gotoxy::@3/(byte) gotoxy::x#7 ) + (bool~) gotoxy::$2 ← (byte) gotoxy::x#4 >= (number) $20 (bool~) gotoxy::$3 ← ! (bool~) gotoxy::$2 if((bool~) gotoxy::$3) goto gotoxy::@2 to:gotoxy::@4 gotoxy::@3: scope:[gotoxy] from gotoxy - (byte) gotoxy::x#5 ← phi( gotoxy/(byte) gotoxy::x#4 ) + (byte) gotoxy::x#7 ← phi( gotoxy/(byte) gotoxy::x#6 ) (byte) gotoxy::y#0 ← (number) 0 to:gotoxy::@1 gotoxy::@2: scope:[gotoxy] from gotoxy::@1 gotoxy::@4 - (byte) gotoxy::y#3 ← phi( gotoxy::@1/(byte) gotoxy::y#4 gotoxy::@4/(byte) gotoxy::y#5 ) - (byte) gotoxy::x#3 ← phi( gotoxy::@1/(byte) gotoxy::x#2 gotoxy::@4/(byte) gotoxy::x#0 ) - (byte) conio_cursor_x ← (byte) gotoxy::x#3 - (byte) conio_cursor_y ← (byte) gotoxy::y#3 - (word~) gotoxy::$6 ← (word)(byte) gotoxy::y#3 + (byte) gotoxy::y#5 ← phi( gotoxy::@1/(byte) gotoxy::y#6 gotoxy::@4/(byte) gotoxy::y#7 ) + (byte) gotoxy::x#5 ← phi( gotoxy::@1/(byte) gotoxy::x#4 gotoxy::@4/(byte) gotoxy::x#0 ) + (byte) conio_cursor_x ← (byte) gotoxy::x#5 + (byte) conio_cursor_y ← (byte) gotoxy::y#5 + (word~) gotoxy::$6 ← (word)(byte) gotoxy::y#5 (number~) gotoxy::$4 ← (word~) gotoxy::$6 * (number) $20 (word) gotoxy::line_offset#0 ← (number~) gotoxy::$4 (byte*~) gotoxy::$5 ← (const nomodify byte*) CONIO_SCREEN_TEXT + (word) gotoxy::line_offset#0 (byte*) conio_line_text ← (byte*~) gotoxy::$5 to:gotoxy::@return gotoxy::@4: scope:[gotoxy] from gotoxy::@1 - (byte) gotoxy::y#5 ← phi( gotoxy::@1/(byte) gotoxy::y#4 ) + (byte) gotoxy::y#7 ← phi( gotoxy::@1/(byte) gotoxy::y#6 ) (byte) gotoxy::x#0 ← (number) 0 to:gotoxy::@2 gotoxy::@return: scope:[gotoxy] from gotoxy::@2 @@ -311,9 +352,9 @@ gotoxy::@return: scope:[gotoxy] from gotoxy::@2 to:@return (void()) cputc((byte) cputc::c) -cputc: scope:[cputc] from cputs::@2 - (byte) cputc::c#1 ← phi( cputs::@2/(byte) cputc::c#0 ) - (bool~) cputc::$0 ← (byte) cputc::c#1 == (byte) ' +cputc: scope:[cputc] from cputcxy::@1 cputs::@2 + (byte) cputc::c#2 ← phi( cputcxy::@1/(byte) cputc::c#1 cputs::@2/(byte) cputc::c#0 ) + (bool~) cputc::$0 ← (byte) cputc::c#2 == (byte) ' ' if((bool~) cputc::$0) goto cputc::@1 to:cputc::@2 @@ -323,10 +364,10 @@ cputc::@1: scope:[cputc] from cputc cputc::@4: scope:[cputc] from cputc::@1 to:cputc::@return cputc::@2: scope:[cputc] from cputc - (byte) cputc::c#2 ← phi( cputc/(byte) cputc::c#1 ) + (byte) cputc::c#3 ← phi( cputc/(byte) cputc::c#2 ) (byte*~) cputc::$1 ← (byte*) conio_line_text + (byte) conio_cursor_x (nomodify void*) ppuDataSet::ppuData#0 ← (void*)(byte*~) cputc::$1 - (byte) ppuDataSet::val#0 ← (byte) cputc::c#2 + (byte) ppuDataSet::val#0 ← (byte) cputc::c#3 call ppuDataSet to:cputc::@5 cputc::@5: scope:[cputc] from cputc::@2 @@ -364,8 +405,8 @@ cscroll: scope:[cscroll] from cputln if((bool~) cscroll::$1) goto cscroll::@return to:cscroll::@1 cscroll::@1: scope:[cscroll] from cscroll - (bool~) cscroll::$8 ← (number) 0 != (byte) conio_scroll_enable - if((bool~) cscroll::$8) goto cscroll::@3 + (bool~) cscroll::$7 ← (number) 0 != (byte) conio_scroll_enable + if((bool~) cscroll::$7) goto cscroll::@3 to:cscroll::@2 cscroll::@3: scope:[cscroll] from cscroll::@1 (byte*) cscroll::line1#0 ← (const nomodify byte*) CONIO_SCREEN_TEXT @@ -376,83 +417,59 @@ cscroll::@2: scope:[cscroll] from cscroll::@1 (byte) gotoxy::x#1 ← (number) 0 (byte) gotoxy::y#1 ← (number) 0 call gotoxy - to:cscroll::@10 -cscroll::@10: scope:[cscroll] from cscroll::@2 + to:cscroll::@7 +cscroll::@7: scope:[cscroll] from cscroll::@2 to:cscroll::@return cscroll::@4: scope:[cscroll] from cscroll::@3 cscroll::@9 - (byte*) cscroll::line1#7 ← phi( cscroll::@3/(byte*) cscroll::line1#0 cscroll::@9/(byte*) cscroll::line1#8 ) - (byte*) cscroll::line2#7 ← phi( cscroll::@3/(byte*) cscroll::line2#0 cscroll::@9/(byte*) cscroll::line2#8 ) + (byte*) cscroll::line1#5 ← phi( cscroll::@3/(byte*) cscroll::line1#0 cscroll::@9/(byte*) cscroll::line1#1 ) + (byte*) cscroll::line2#4 ← phi( cscroll::@3/(byte*) cscroll::line2#0 cscroll::@9/(byte*) cscroll::line2#1 ) (byte) cscroll::y#2 ← phi( cscroll::@3/(byte) cscroll::y#0 cscroll::@9/(byte) cscroll::y#1 ) (bool~) cscroll::$3 ← (byte) cscroll::y#2 < (number) $1e-(number) 1 if((bool~) cscroll::$3) goto cscroll::@5 to:cscroll::@6 cscroll::@5: scope:[cscroll] from cscroll::@4 - (byte*) cscroll::line1#6 ← phi( cscroll::@4/(byte*) cscroll::line1#7 ) - (byte) cscroll::y#6 ← phi( cscroll::@4/(byte) cscroll::y#2 ) - (byte*) cscroll::line2#6 ← phi( cscroll::@4/(byte*) cscroll::line2#7 ) - (byte) cscroll::x#0 ← (byte) 0 - to:cscroll::@7 + (byte) cscroll::y#5 ← phi( cscroll::@4/(byte) cscroll::y#2 ) + (byte*) cscroll::line1#4 ← phi( cscroll::@4/(byte*) cscroll::line1#5 ) + (byte*) cscroll::line2#2 ← phi( cscroll::@4/(byte*) cscroll::line2#4 ) + (nomodify void*) ppuDataFetch::cpuData#0 ← (void*)(const byte*) scroll_buffer + (nomodify void*) ppuDataFetch::ppuData#0 ← (void*)(byte*) cscroll::line2#2 + (word) ppuDataFetch::size#0 ← (number) $20 + call ppuDataFetch + to:cscroll::@8 +cscroll::@8: scope:[cscroll] from cscroll::@5 + (byte) cscroll::y#4 ← phi( cscroll::@5/(byte) cscroll::y#5 ) + (byte*) cscroll::line2#5 ← phi( cscroll::@5/(byte*) cscroll::line2#2 ) + (byte*) cscroll::line1#2 ← phi( cscroll::@5/(byte*) cscroll::line1#4 ) + (nomodify void*) ppuDataTransfer::ppuData#0 ← (void*)(byte*) cscroll::line1#2 + (nomodify void*) ppuDataTransfer::cpuData#0 ← (void*)(const byte*) scroll_buffer + (word) ppuDataTransfer::size#0 ← (number) $20 + call ppuDataTransfer + to:cscroll::@9 +cscroll::@9: scope:[cscroll] from cscroll::@8 + (byte) cscroll::y#3 ← phi( cscroll::@8/(byte) cscroll::y#4 ) + (byte*) cscroll::line2#3 ← phi( cscroll::@8/(byte*) cscroll::line2#5 ) + (byte*) cscroll::line1#3 ← phi( cscroll::@8/(byte*) cscroll::line1#2 ) + (byte*) cscroll::line1#1 ← (byte*) cscroll::line1#3 + (number) $20 + (byte*) cscroll::line2#1 ← (byte*) cscroll::line2#3 + (number) $20 + (byte) cscroll::y#1 ← ++ (byte) cscroll::y#3 + to:cscroll::@4 cscroll::@6: scope:[cscroll] from cscroll::@4 (nomodify void*) ppuDataFill::ppuData#1 ← (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(number) $1e*(number) $20-(number) $20 (byte) ppuDataFill::val#1 ← (byte) ' ' (word) ppuDataFill::size#1 ← (number) $20 call ppuDataFill - to:cscroll::@11 -cscroll::@11: scope:[cscroll] from cscroll::@6 + to:cscroll::@10 +cscroll::@10: scope:[cscroll] from cscroll::@6 (byte*) conio_line_text ← (byte*) conio_line_text - (number) $20 (byte) conio_cursor_y ← -- (byte) conio_cursor_y to:cscroll::@return -cscroll::@7: scope:[cscroll] from cscroll::@13 cscroll::@5 - (byte*) cscroll::line1#5 ← phi( cscroll::@13/(byte*) cscroll::line1#1 cscroll::@5/(byte*) cscroll::line1#6 ) - (byte) cscroll::y#4 ← phi( cscroll::@13/(byte) cscroll::y#5 cscroll::@5/(byte) cscroll::y#6 ) - (byte*) cscroll::line2#4 ← phi( cscroll::@13/(byte*) cscroll::line2#5 cscroll::@5/(byte*) cscroll::line2#6 ) - (byte) cscroll::x#2 ← phi( cscroll::@13/(byte) cscroll::x#1 cscroll::@5/(byte) cscroll::x#0 ) - (bool~) cscroll::$4 ← (byte) cscroll::x#2 < (number) $20 - if((bool~) cscroll::$4) goto cscroll::@8 - to:cscroll::@9 -cscroll::@8: scope:[cscroll] from cscroll::@7 - (byte) cscroll::y#8 ← phi( cscroll::@7/(byte) cscroll::y#4 ) - (byte) cscroll::x#5 ← phi( cscroll::@7/(byte) cscroll::x#2 ) - (byte*) cscroll::line1#4 ← phi( cscroll::@7/(byte*) cscroll::line1#5 ) - (byte*) cscroll::line2#2 ← phi( cscroll::@7/(byte*) cscroll::line2#4 ) - (nomodify void*) ppuDataGet::ppuData#0 ← (void*)(byte*) cscroll::line2#2 - call ppuDataGet - (byte) ppuDataGet::return#2 ← (byte) ppuDataGet::return#1 - to:cscroll::@12 -cscroll::@12: scope:[cscroll] from cscroll::@8 - (byte) cscroll::y#7 ← phi( cscroll::@8/(byte) cscroll::y#8 ) - (byte) cscroll::x#4 ← phi( cscroll::@8/(byte) cscroll::x#5 ) - (byte*) cscroll::line1#2 ← phi( cscroll::@8/(byte*) cscroll::line1#4 ) - (byte*) cscroll::line2#3 ← phi( cscroll::@8/(byte*) cscroll::line2#2 ) - (byte) ppuDataGet::return#4 ← phi( cscroll::@8/(byte) ppuDataGet::return#2 ) - (byte~) cscroll::$5 ← (byte) ppuDataGet::return#4 - (byte) cscroll::ch#0 ← (byte~) cscroll::$5 - (byte*) cscroll::line2#1 ← ++ (byte*) cscroll::line2#3 - (nomodify void*) ppuDataSet::ppuData#1 ← (void*)(byte*) cscroll::line1#2 - (byte) ppuDataSet::val#1 ← (byte) cscroll::ch#0 - call ppuDataSet - to:cscroll::@13 -cscroll::@13: scope:[cscroll] from cscroll::@12 - (byte) cscroll::y#5 ← phi( cscroll::@12/(byte) cscroll::y#7 ) - (byte*) cscroll::line2#5 ← phi( cscroll::@12/(byte*) cscroll::line2#1 ) - (byte) cscroll::x#3 ← phi( cscroll::@12/(byte) cscroll::x#4 ) - (byte*) cscroll::line1#3 ← phi( cscroll::@12/(byte*) cscroll::line1#2 ) - (byte*) cscroll::line1#1 ← ++ (byte*) cscroll::line1#3 - (byte) cscroll::x#1 ← ++ (byte) cscroll::x#3 - to:cscroll::@7 -cscroll::@9: scope:[cscroll] from cscroll::@7 - (byte*) cscroll::line1#8 ← phi( cscroll::@7/(byte*) cscroll::line1#5 ) - (byte*) cscroll::line2#8 ← phi( cscroll::@7/(byte*) cscroll::line2#4 ) - (byte) cscroll::y#3 ← phi( cscroll::@7/(byte) cscroll::y#4 ) - (byte) cscroll::y#1 ← ++ (byte) cscroll::y#3 - to:cscroll::@4 -cscroll::@return: scope:[cscroll] from cscroll cscroll::@10 cscroll::@11 +cscroll::@return: scope:[cscroll] from cscroll cscroll::@10 cscroll::@7 return to:@return (void()) cputs((to_nomodify byte*) cputs::s) -cputs: scope:[cputs] from main::@6 - (to_nomodify byte*) cputs::s#3 ← phi( main::@6/(to_nomodify byte*) cputs::s#1 ) +cputs: scope:[cputs] from cputsxy::@1 + (to_nomodify byte*) cputs::s#3 ← phi( cputsxy::@1/(to_nomodify byte*) cputs::s#1 ) (byte) cputs::c#0 ← (byte) 0 to:cputs::@1 cputs::@1: scope:[cputs] from cputs cputs::@3 @@ -475,6 +492,224 @@ cputs::@return: scope:[cputs] from cputs::@1 return to:@return +(void()) cputcxy((byte) cputcxy::x , (byte) cputcxy::y , (byte) cputcxy::c) +cputcxy: scope:[cputcxy] from main::@1 main::@10 main::@12 main::@3 + (byte) cputcxy::c#5 ← phi( main::@1/(byte) cputcxy::c#0 main::@10/(byte) cputcxy::c#1 main::@12/(byte) cputcxy::c#3 main::@3/(byte) cputcxy::c#2 ) + (byte) cputcxy::y#4 ← phi( main::@1/(byte) cputcxy::y#0 main::@10/(byte) cputcxy::y#1 main::@12/(byte) cputcxy::y#3 main::@3/(byte) cputcxy::y#2 ) + (byte) cputcxy::x#4 ← phi( main::@1/(byte) cputcxy::x#0 main::@10/(byte) cputcxy::x#1 main::@12/(byte) cputcxy::x#3 main::@3/(byte) cputcxy::x#2 ) + (byte) gotoxy::x#2 ← (byte) cputcxy::x#4 + (byte) gotoxy::y#2 ← (byte) cputcxy::y#4 + call gotoxy + to:cputcxy::@1 +cputcxy::@1: scope:[cputcxy] from cputcxy + (byte) cputcxy::c#4 ← phi( cputcxy/(byte) cputcxy::c#5 ) + (byte) cputc::c#1 ← (byte) cputcxy::c#4 + call cputc + to:cputcxy::@2 +cputcxy::@2: scope:[cputcxy] from cputcxy::@1 + to:cputcxy::@return +cputcxy::@return: scope:[cputcxy] from cputcxy::@2 + return + to:@return + +(void()) cputsxy((byte) cputsxy::x , (byte) cputsxy::y , (to_nomodify byte*) cputsxy::s) +cputsxy: scope:[cputsxy] from main::@22 + (to_nomodify byte*) cputsxy::s#2 ← phi( main::@22/(to_nomodify byte*) cputsxy::s#0 ) + (byte) cputsxy::y#1 ← phi( main::@22/(byte) cputsxy::y#0 ) + (byte) cputsxy::x#1 ← phi( main::@22/(byte) cputsxy::x#0 ) + (byte) gotoxy::x#3 ← (byte) cputsxy::x#1 + (byte) gotoxy::y#3 ← (byte) cputsxy::y#1 + call gotoxy + to:cputsxy::@1 +cputsxy::@1: scope:[cputsxy] from cputsxy + (to_nomodify byte*) cputsxy::s#1 ← phi( cputsxy/(to_nomodify byte*) cputsxy::s#2 ) + (to_nomodify byte*) cputs::s#1 ← (to_nomodify byte*) cputsxy::s#1 + call cputs + to:cputsxy::@2 +cputsxy::@2: scope:[cputsxy] from cputsxy::@1 + to:cputsxy::@return +cputsxy::@return: scope:[cputsxy] from cputsxy::@2 + return + to:@return + +(void()) uctoa((byte) uctoa::value , (byte*) uctoa::buffer , (byte) uctoa::radix) +uctoa: scope:[uctoa] from main::@5 + (byte*) uctoa::buffer#21 ← phi( main::@5/(byte*) uctoa::buffer#5 ) + (byte) uctoa::value#12 ← phi( main::@5/(byte) uctoa::value#1 ) + (byte) uctoa::radix#1 ← phi( main::@5/(byte) uctoa::radix#0 ) + (byte) uctoa::max_digits#0 ← (byte) 0 + (byte*) uctoa::digit_values#0 ← (byte*) 0 + (bool~) uctoa::$0 ← (byte) uctoa::radix#1 == (const byte) DECIMAL + if((bool~) uctoa::$0) goto uctoa::@1 + to:uctoa::@6 +uctoa::@1: scope:[uctoa] from uctoa + (byte*) uctoa::buffer#17 ← phi( uctoa/(byte*) uctoa::buffer#21 ) + (byte) uctoa::value#8 ← phi( uctoa/(byte) uctoa::value#12 ) + (byte) uctoa::max_digits#1 ← (number) 3 + (byte*) uctoa::digit_values#1 ← (const byte*) RADIX_DECIMAL_VALUES_CHAR + to:uctoa::@5 +uctoa::@6: scope:[uctoa] from uctoa + (byte) uctoa::value#13 ← phi( uctoa/(byte) uctoa::value#12 ) + (byte*) uctoa::buffer#16 ← phi( uctoa/(byte*) uctoa::buffer#21 ) + (byte) uctoa::radix#2 ← phi( uctoa/(byte) uctoa::radix#1 ) + (bool~) uctoa::$1 ← (byte) uctoa::radix#2 == (const byte) HEXADECIMAL + if((bool~) uctoa::$1) goto uctoa::@2 + to:uctoa::@7 +uctoa::@2: scope:[uctoa] from uctoa::@6 + (byte*) uctoa::buffer#18 ← phi( uctoa::@6/(byte*) uctoa::buffer#16 ) + (byte) uctoa::value#9 ← phi( uctoa::@6/(byte) uctoa::value#13 ) + (byte) uctoa::max_digits#2 ← (number) 2 + (byte*) uctoa::digit_values#2 ← (const byte*) RADIX_HEXADECIMAL_VALUES_CHAR + to:uctoa::@5 +uctoa::@7: scope:[uctoa] from uctoa::@6 + (byte) uctoa::value#14 ← phi( uctoa::@6/(byte) uctoa::value#13 ) + (byte*) uctoa::buffer#13 ← phi( uctoa::@6/(byte*) uctoa::buffer#16 ) + (byte) uctoa::radix#3 ← phi( uctoa::@6/(byte) uctoa::radix#2 ) + (bool~) uctoa::$2 ← (byte) uctoa::radix#3 == (const byte) OCTAL + if((bool~) uctoa::$2) goto uctoa::@3 + to:uctoa::@8 +uctoa::@3: scope:[uctoa] from uctoa::@7 + (byte*) uctoa::buffer#19 ← phi( uctoa::@7/(byte*) uctoa::buffer#13 ) + (byte) uctoa::value#10 ← phi( uctoa::@7/(byte) uctoa::value#14 ) + (byte) uctoa::max_digits#3 ← (number) 3 + (byte*) uctoa::digit_values#3 ← (const byte*) RADIX_OCTAL_VALUES_CHAR + to:uctoa::@5 +uctoa::@8: scope:[uctoa] from uctoa::@7 + (byte) uctoa::value#15 ← phi( uctoa::@7/(byte) uctoa::value#14 ) + (byte*) uctoa::buffer#10 ← phi( uctoa::@7/(byte*) uctoa::buffer#13 ) + (byte) uctoa::radix#4 ← phi( uctoa::@7/(byte) uctoa::radix#3 ) + (bool~) uctoa::$3 ← (byte) uctoa::radix#4 == (const byte) BINARY + if((bool~) uctoa::$3) goto uctoa::@4 + to:uctoa::@9 +uctoa::@4: scope:[uctoa] from uctoa::@8 + (byte*) uctoa::buffer#20 ← phi( uctoa::@8/(byte*) uctoa::buffer#10 ) + (byte) uctoa::value#11 ← phi( uctoa::@8/(byte) uctoa::value#15 ) + (byte) uctoa::max_digits#4 ← (number) 8 + (byte*) uctoa::digit_values#4 ← (const byte*) RADIX_BINARY_VALUES_CHAR + to:uctoa::@5 +uctoa::@9: scope:[uctoa] from uctoa::@8 + (byte*) uctoa::buffer#6 ← phi( uctoa::@8/(byte*) uctoa::buffer#10 ) + *((byte*) uctoa::buffer#6) ← (byte) 'e' + (byte*) uctoa::buffer#0 ← ++ (byte*) uctoa::buffer#6 + *((byte*) uctoa::buffer#0) ← (byte) 'r' + (byte*) uctoa::buffer#1 ← ++ (byte*) uctoa::buffer#0 + *((byte*) uctoa::buffer#1) ← (byte) 'r' + (byte*) uctoa::buffer#2 ← ++ (byte*) uctoa::buffer#1 + *((byte*) uctoa::buffer#2) ← (number) 0 + to:uctoa::@return +uctoa::@return: scope:[uctoa] from uctoa::@12 uctoa::@9 + return + to:@return +uctoa::@5: scope:[uctoa] from uctoa::@1 uctoa::@2 uctoa::@3 uctoa::@4 + (byte*) uctoa::buffer#15 ← phi( uctoa::@1/(byte*) uctoa::buffer#17 uctoa::@2/(byte*) uctoa::buffer#18 uctoa::@3/(byte*) uctoa::buffer#19 uctoa::@4/(byte*) uctoa::buffer#20 ) + (byte) uctoa::value#7 ← phi( uctoa::@1/(byte) uctoa::value#8 uctoa::@2/(byte) uctoa::value#9 uctoa::@3/(byte) uctoa::value#10 uctoa::@4/(byte) uctoa::value#11 ) + (byte*) uctoa::digit_values#8 ← phi( uctoa::@1/(byte*) uctoa::digit_values#1 uctoa::@2/(byte*) uctoa::digit_values#2 uctoa::@3/(byte*) uctoa::digit_values#3 uctoa::@4/(byte*) uctoa::digit_values#4 ) + (byte) uctoa::max_digits#7 ← phi( uctoa::@1/(byte) uctoa::max_digits#1 uctoa::@2/(byte) uctoa::max_digits#2 uctoa::@3/(byte) uctoa::max_digits#3 uctoa::@4/(byte) uctoa::max_digits#4 ) + (byte) uctoa::started#0 ← (byte) 0 + (byte) uctoa::digit#0 ← (byte) 0 + to:uctoa::@10 +uctoa::@10: scope:[uctoa] from uctoa::@13 uctoa::@5 + (byte*) uctoa::buffer#11 ← phi( uctoa::@13/(byte*) uctoa::buffer#14 uctoa::@5/(byte*) uctoa::buffer#15 ) + (byte) uctoa::started#3 ← phi( uctoa::@13/(byte) uctoa::started#4 uctoa::@5/(byte) uctoa::started#0 ) + (byte) uctoa::value#5 ← phi( uctoa::@13/(byte) uctoa::value#6 uctoa::@5/(byte) uctoa::value#7 ) + (byte*) uctoa::digit_values#6 ← phi( uctoa::@13/(byte*) uctoa::digit_values#7 uctoa::@5/(byte*) uctoa::digit_values#8 ) + (byte) uctoa::digit#2 ← phi( uctoa::@13/(byte) uctoa::digit#1 uctoa::@5/(byte) uctoa::digit#0 ) + (byte) uctoa::max_digits#5 ← phi( uctoa::@13/(byte) uctoa::max_digits#6 uctoa::@5/(byte) uctoa::max_digits#7 ) + (number~) uctoa::$4 ← (byte) uctoa::max_digits#5 - (number) 1 + (bool~) uctoa::$5 ← (byte) uctoa::digit#2 < (number~) uctoa::$4 + if((bool~) uctoa::$5) goto uctoa::@11 + to:uctoa::@12 +uctoa::@11: scope:[uctoa] from uctoa::@10 + (byte) uctoa::max_digits#8 ← phi( uctoa::@10/(byte) uctoa::max_digits#5 ) + (byte*) uctoa::buffer#12 ← phi( uctoa::@10/(byte*) uctoa::buffer#11 ) + (byte) uctoa::started#2 ← phi( uctoa::@10/(byte) uctoa::started#3 ) + (byte) uctoa::value#2 ← phi( uctoa::@10/(byte) uctoa::value#5 ) + (byte) uctoa::digit#3 ← phi( uctoa::@10/(byte) uctoa::digit#2 ) + (byte*) uctoa::digit_values#5 ← phi( uctoa::@10/(byte*) uctoa::digit_values#6 ) + (byte) uctoa::digit_value#0 ← *((byte*) uctoa::digit_values#5 + (byte) uctoa::digit#3) + (bool~) uctoa::$6 ← (byte) uctoa::value#2 >= (byte) uctoa::digit_value#0 + (bool~) uctoa::$7 ← (byte) uctoa::started#2 || (bool~) uctoa::$6 + (bool~) uctoa::$8 ← ! (bool~) uctoa::$7 + if((bool~) uctoa::$8) goto uctoa::@13 + to:uctoa::@14 +uctoa::@12: scope:[uctoa] from uctoa::@10 + (byte*) uctoa::buffer#7 ← phi( uctoa::@10/(byte*) uctoa::buffer#11 ) + (byte) uctoa::value#3 ← phi( uctoa::@10/(byte) uctoa::value#5 ) + (byte~) uctoa::$10 ← (byte)(byte) uctoa::value#3 + *((byte*) uctoa::buffer#7) ← *((const byte*) DIGITS + (byte~) uctoa::$10) + (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#7 + *((byte*) uctoa::buffer#3) ← (number) 0 + to:uctoa::@return +uctoa::@13: scope:[uctoa] from uctoa::@11 uctoa::@15 + (byte*) uctoa::buffer#14 ← phi( uctoa::@11/(byte*) uctoa::buffer#12 uctoa::@15/(byte*) uctoa::buffer#4 ) + (byte) uctoa::started#4 ← phi( uctoa::@11/(byte) uctoa::started#2 uctoa::@15/(byte) uctoa::started#1 ) + (byte) uctoa::value#6 ← phi( uctoa::@11/(byte) uctoa::value#2 uctoa::@15/(byte) uctoa::value#0 ) + (byte*) uctoa::digit_values#7 ← phi( uctoa::@11/(byte*) uctoa::digit_values#5 uctoa::@15/(byte*) uctoa::digit_values#9 ) + (byte) uctoa::max_digits#6 ← phi( uctoa::@11/(byte) uctoa::max_digits#8 uctoa::@15/(byte) uctoa::max_digits#9 ) + (byte) uctoa::digit#4 ← phi( uctoa::@11/(byte) uctoa::digit#3 uctoa::@15/(byte) uctoa::digit#5 ) + (byte) uctoa::digit#1 ← ++ (byte) uctoa::digit#4 + to:uctoa::@10 +uctoa::@14: scope:[uctoa] from uctoa::@11 + (byte*) uctoa::digit_values#10 ← phi( uctoa::@11/(byte*) uctoa::digit_values#5 ) + (byte) uctoa::max_digits#10 ← phi( uctoa::@11/(byte) uctoa::max_digits#8 ) + (byte) uctoa::digit#6 ← phi( uctoa::@11/(byte) uctoa::digit#3 ) + (byte) uctoa::digit_value#1 ← phi( uctoa::@11/(byte) uctoa::digit_value#0 ) + (byte) uctoa::value#4 ← phi( uctoa::@11/(byte) uctoa::value#2 ) + (byte*) uctoa::buffer#8 ← phi( uctoa::@11/(byte*) uctoa::buffer#12 ) + (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#8 + (byte) uctoa_append::value#0 ← (byte) uctoa::value#4 + (byte) uctoa_append::sub#0 ← (byte) uctoa::digit_value#1 + call uctoa_append + (byte) uctoa_append::return#0 ← (byte) uctoa_append::return#2 + to:uctoa::@15 +uctoa::@15: scope:[uctoa] from uctoa::@14 + (byte*) uctoa::digit_values#9 ← phi( uctoa::@14/(byte*) uctoa::digit_values#10 ) + (byte) uctoa::max_digits#9 ← phi( uctoa::@14/(byte) uctoa::max_digits#10 ) + (byte) uctoa::digit#5 ← phi( uctoa::@14/(byte) uctoa::digit#6 ) + (byte*) uctoa::buffer#9 ← phi( uctoa::@14/(byte*) uctoa::buffer#8 ) + (byte) uctoa_append::return#3 ← phi( uctoa::@14/(byte) uctoa_append::return#0 ) + (byte~) uctoa::$9 ← (byte) uctoa_append::return#3 + (byte) uctoa::value#0 ← (byte~) uctoa::$9 + (byte*) uctoa::buffer#4 ← ++ (byte*) uctoa::buffer#9 + (byte) uctoa::started#1 ← (number) 1 + to:uctoa::@13 + +(byte()) uctoa_append((byte*) uctoa_append::buffer , (byte) uctoa_append::value , (byte) uctoa_append::sub) +uctoa_append: scope:[uctoa_append] from uctoa::@14 + (byte*) uctoa_append::buffer#3 ← phi( uctoa::@14/(byte*) uctoa_append::buffer#0 ) + (byte) uctoa_append::sub#3 ← phi( uctoa::@14/(byte) uctoa_append::sub#0 ) + (byte) uctoa_append::value#5 ← phi( uctoa::@14/(byte) uctoa_append::value#0 ) + (byte) uctoa_append::digit#0 ← (byte) 0 + to:uctoa_append::@1 +uctoa_append::@1: scope:[uctoa_append] from uctoa_append uctoa_append::@2 + (byte*) uctoa_append::buffer#2 ← phi( uctoa_append/(byte*) uctoa_append::buffer#3 uctoa_append::@2/(byte*) uctoa_append::buffer#4 ) + (byte) uctoa_append::digit#4 ← phi( uctoa_append/(byte) uctoa_append::digit#0 uctoa_append::@2/(byte) uctoa_append::digit#1 ) + (byte) uctoa_append::sub#1 ← phi( uctoa_append/(byte) uctoa_append::sub#3 uctoa_append::@2/(byte) uctoa_append::sub#2 ) + (byte) uctoa_append::value#2 ← phi( uctoa_append/(byte) uctoa_append::value#5 uctoa_append::@2/(byte) uctoa_append::value#1 ) + (bool~) uctoa_append::$0 ← (byte) uctoa_append::value#2 >= (byte) uctoa_append::sub#1 + if((bool~) uctoa_append::$0) goto uctoa_append::@2 + to:uctoa_append::@3 +uctoa_append::@2: scope:[uctoa_append] from uctoa_append::@1 + (byte*) uctoa_append::buffer#4 ← phi( uctoa_append::@1/(byte*) uctoa_append::buffer#2 ) + (byte) uctoa_append::sub#2 ← phi( uctoa_append::@1/(byte) uctoa_append::sub#1 ) + (byte) uctoa_append::value#3 ← phi( uctoa_append::@1/(byte) uctoa_append::value#2 ) + (byte) uctoa_append::digit#2 ← phi( uctoa_append::@1/(byte) uctoa_append::digit#4 ) + (byte) uctoa_append::digit#1 ← ++ (byte) uctoa_append::digit#2 + (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#3 - (byte) uctoa_append::sub#2 + to:uctoa_append::@1 +uctoa_append::@3: scope:[uctoa_append] from uctoa_append::@1 + (byte) uctoa_append::value#4 ← phi( uctoa_append::@1/(byte) uctoa_append::value#2 ) + (byte*) uctoa_append::buffer#1 ← phi( uctoa_append::@1/(byte*) uctoa_append::buffer#2 ) + (byte) uctoa_append::digit#3 ← phi( uctoa_append::@1/(byte) uctoa_append::digit#4 ) + *((byte*) uctoa_append::buffer#1) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#3) + (byte) uctoa_append::return#1 ← (byte) uctoa_append::value#4 + to:uctoa_append::@return +uctoa_append::@return: scope:[uctoa_append] from uctoa_append::@3 + (byte) uctoa_append::return#4 ← phi( uctoa_append::@3/(byte) uctoa_append::return#1 ) + (byte) uctoa_append::return#2 ← (byte) uctoa_append::return#4 + return + to:@return + (void()) main() main: scope:[main] from @3 to:main::initNES1 @@ -537,50 +772,190 @@ main::initNES1_waitForVBlank2_@1: scope:[main] from main::initNES1_waitForVBlan to:main::initNES1_@7 main::initNES1_@7: scope:[main] from main::initNES1_waitForVBlank2_@1 asm { ldaPPU_PPUSTATUS } - to:main::@2 -main::@2: scope:[main] from main::initNES1_@7 + to:main::@8 +main::@8: scope:[main] from main::initNES1_@7 (byte~) main::$1 ← sizeof (const byte*) PALETTE - (nomodify void*) ppuDataTransfer::ppuData#0 ← (void*)(const nomodify byte*) PPU_PALETTE - (nomodify void*) ppuDataTransfer::cpuData#0 ← (void*)(const byte*) PALETTE - (word) ppuDataTransfer::size#0 ← (byte~) main::$1 + (nomodify void*) ppuDataTransfer::ppuData#1 ← (void*)(const nomodify byte*) PPU_PALETTE + (nomodify void*) ppuDataTransfer::cpuData#1 ← (void*)(const byte*) PALETTE + (word) ppuDataTransfer::size#1 ← (byte~) main::$1 call ppuDataTransfer - to:main::@3 -main::@3: scope:[main] from main::@2 + to:main::@14 +main::@14: scope:[main] from main::@8 (nomodify void*) ppuDataFill::ppuData#2 ← (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 (byte) ppuDataFill::val#2 ← (number) 0 (word) ppuDataFill::size#2 ← (number) $40 call ppuDataFill - to:main::@4 -main::@4: scope:[main] from main::@3 + to:main::@15 +main::@15: scope:[main] from main::@14 (nomodify void*) ppuDataFill::ppuData#3 ← (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_1 (byte) ppuDataFill::val#3 ← (number) 0 (word) ppuDataFill::size#3 ← (number) $40 call ppuDataFill - to:main::@5 -main::@5: scope:[main] from main::@4 + to:main::@16 +main::@16: scope:[main] from main::@15 call clrscr + to:main::@17 +main::@17: scope:[main] from main::@16 + (byte) main::x#0 ← (byte) 1 + to:main::screensizex1 +main::screensizex1: scope:[main] from main::@17 main::@19 + (byte) main::x#8 ← phi( main::@17/(byte) main::x#0 main::@19/(byte) main::x#1 ) + (byte) main::screensizex1_return#0 ← (number) $20 + to:main::screensizex1_@return +main::screensizex1_@return: scope:[main] from main::screensizex1 + (byte) main::x#6 ← phi( main::screensizex1/(byte) main::x#8 ) + (byte) main::screensizex1_return#2 ← phi( main::screensizex1/(byte) main::screensizex1_return#0 ) + (byte) main::screensizex1_return#1 ← (byte) main::screensizex1_return#2 + to:main::@9 +main::@9: scope:[main] from main::screensizex1_@return + (byte) main::x#2 ← phi( main::screensizex1_@return/(byte) main::x#6 ) + (byte) main::screensizex1_return#3 ← phi( main::screensizex1_@return/(byte) main::screensizex1_return#1 ) + (byte~) main::$7 ← (byte) main::screensizex1_return#3 + (number~) main::$8 ← (byte~) main::$7 - (number) 1 + (bool~) main::$9 ← (byte) main::x#2 < (number~) main::$8 + if((bool~) main::$9) goto main::@1 + to:main::@2 +main::@1: scope:[main] from main::@9 + (byte) main::x#3 ← phi( main::@9/(byte) main::x#2 ) + (byte) cputcxy::x#0 ← (byte) main::x#3 + (byte) cputcxy::y#0 ← (number) 1 + (byte) cputcxy::c#0 ← (byte) '-' + call cputcxy + to:main::@18 +main::@18: scope:[main] from main::@1 + (byte) main::x#10 ← phi( main::@1/(byte) main::x#3 ) + to:main::screensizey1 +main::screensizey1: scope:[main] from main::@18 + (byte) main::x#9 ← phi( main::@18/(byte) main::x#10 ) + (byte) main::screensizey1_return#0 ← (number) $1e + to:main::screensizey1_@return +main::screensizey1_@return: scope:[main] from main::screensizey1 + (byte) main::x#7 ← phi( main::screensizey1/(byte) main::x#9 ) + (byte) main::screensizey1_return#2 ← phi( main::screensizey1/(byte) main::screensizey1_return#0 ) + (byte) main::screensizey1_return#1 ← (byte) main::screensizey1_return#2 + to:main::@10 +main::@10: scope:[main] from main::screensizey1_@return + (byte) main::x#4 ← phi( main::screensizey1_@return/(byte) main::x#7 ) + (byte) main::screensizey1_return#3 ← phi( main::screensizey1_@return/(byte) main::screensizey1_return#1 ) + (byte~) main::$11 ← (byte) main::screensizey1_return#3 + (number~) main::$12 ← (byte~) main::$11 - (number) 4 + (byte) cputcxy::x#1 ← (byte) main::x#4 + (byte) cputcxy::y#1 ← (number~) main::$12 + (byte) cputcxy::c#1 ← (byte) '-' + call cputcxy + to:main::@19 +main::@19: scope:[main] from main::@10 + (byte) main::x#5 ← phi( main::@10/(byte) main::x#4 ) + (byte) main::x#1 ← ++ (byte) main::x#5 + to:main::screensizex1 +main::@2: scope:[main] from main::@9 + (byte) main::y#0 ← (byte) 1 + to:main::screensizey2 +main::screensizey2: scope:[main] from main::@2 main::@21 + (byte) main::y#8 ← phi( main::@2/(byte) main::y#0 main::@21/(byte) main::y#1 ) + (byte) main::screensizey2_return#0 ← (number) $1e + to:main::screensizey2_@return +main::screensizey2_@return: scope:[main] from main::screensizey2 + (byte) main::y#6 ← phi( main::screensizey2/(byte) main::y#8 ) + (byte) main::screensizey2_return#2 ← phi( main::screensizey2/(byte) main::screensizey2_return#0 ) + (byte) main::screensizey2_return#1 ← (byte) main::screensizey2_return#2 + to:main::@11 +main::@11: scope:[main] from main::screensizey2_@return + (byte) main::y#2 ← phi( main::screensizey2_@return/(byte) main::y#6 ) + (byte) main::screensizey2_return#3 ← phi( main::screensizey2_@return/(byte) main::screensizey2_return#1 ) + (byte~) main::$14 ← (byte) main::screensizey2_return#3 + (number~) main::$15 ← (byte~) main::$14 - (number) 3 + (bool~) main::$16 ← (byte) main::y#2 < (number~) main::$15 + if((bool~) main::$16) goto main::@3 + to:main::@4 +main::@3: scope:[main] from main::@11 + (byte) main::y#3 ← phi( main::@11/(byte) main::y#2 ) + (byte) cputcxy::x#2 ← (number) 1 + (byte) cputcxy::y#2 ← (byte) main::y#3 + (byte) cputcxy::c#2 ← (byte) 'i' + call cputcxy + to:main::@20 +main::@20: scope:[main] from main::@3 + (byte) main::y#10 ← phi( main::@3/(byte) main::y#3 ) + to:main::screensizex2 +main::screensizex2: scope:[main] from main::@20 + (byte) main::y#9 ← phi( main::@20/(byte) main::y#10 ) + (byte) main::screensizex2_return#0 ← (number) $20 + to:main::screensizex2_@return +main::screensizex2_@return: scope:[main] from main::screensizex2 + (byte) main::y#7 ← phi( main::screensizex2/(byte) main::y#9 ) + (byte) main::screensizex2_return#2 ← phi( main::screensizex2/(byte) main::screensizex2_return#0 ) + (byte) main::screensizex2_return#1 ← (byte) main::screensizex2_return#2 + to:main::@12 +main::@12: scope:[main] from main::screensizex2_@return + (byte) main::y#4 ← phi( main::screensizex2_@return/(byte) main::y#7 ) + (byte) main::screensizex2_return#3 ← phi( main::screensizex2_@return/(byte) main::screensizex2_return#1 ) + (byte~) main::$18 ← (byte) main::screensizex2_return#3 + (number~) main::$19 ← (byte~) main::$18 - (number) 2 + (byte) cputcxy::x#3 ← (number~) main::$19 + (byte) cputcxy::y#3 ← (byte) main::y#4 + (byte) cputcxy::c#3 ← (byte) 'i' + call cputcxy + to:main::@21 +main::@21: scope:[main] from main::@12 + (byte) main::y#5 ← phi( main::@12/(byte) main::y#4 ) + (byte) main::y#1 ← ++ (byte) main::y#5 + to:main::screensizey2 +main::@4: scope:[main] from main::@11 + (byte) main::i#0 ← (byte) 0 + to:main::screensizey3 +main::screensizey3: scope:[main] from main::@23 main::@4 + (byte) main::i#7 ← phi( main::@23/(byte) main::i#1 main::@4/(byte) main::i#0 ) + (byte) main::screensizey3_return#0 ← (number) $1e + to:main::screensizey3_@return +main::screensizey3_@return: scope:[main] from main::screensizey3 + (byte) main::i#6 ← phi( main::screensizey3/(byte) main::i#7 ) + (byte) main::screensizey3_return#2 ← phi( main::screensizey3/(byte) main::screensizey3_return#0 ) + (byte) main::screensizey3_return#1 ← (byte) main::screensizey3_return#2 + to:main::@13 +main::@13: scope:[main] from main::screensizey3_@return + (byte) main::i#2 ← phi( main::screensizey3_@return/(byte) main::i#6 ) + (byte) main::screensizey3_return#3 ← phi( main::screensizey3_@return/(byte) main::screensizey3_return#1 ) + (byte~) main::$21 ← (byte) main::screensizey3_return#3 + (bool~) main::$22 ← (byte) main::i#2 < (byte~) main::$21 + if((bool~) main::$22) goto main::@5 to:main::@6 -main::@6: scope:[main] from main::@5 - (to_nomodify byte*) cputs::s#1 ← (const byte*) main::s - call cputs - to:main::@7 -main::@7: scope:[main] from main::@6 +main::@5: scope:[main] from main::@13 + (byte) main::i#3 ← phi( main::@13/(byte) main::i#2 ) + (number~) main::$23 ← (byte) main::i#3 & (number) $f + (byte) uctoa::value#1 ← (number~) main::$23 + (byte*) uctoa::buffer#5 ← (const byte*) num_buffer + (byte) uctoa::radix#0 ← (const byte) HEXADECIMAL + call uctoa + to:main::@22 +main::@22: scope:[main] from main::@5 + (byte) main::i#4 ← phi( main::@5/(byte) main::i#3 ) + (byte) cputsxy::x#0 ← (byte) main::i#4 + (byte) cputsxy::y#0 ← (byte) main::i#4 + (to_nomodify byte*) cputsxy::s#0 ← (const byte*) num_buffer + call cputsxy + to:main::@23 +main::@23: scope:[main] from main::@22 + (byte) main::i#5 ← phi( main::@22/(byte) main::i#4 ) + (byte) main::i#1 ← ++ (byte) main::i#5 + to:main::screensizey3 +main::@6: scope:[main] from main::@13 (volatile byte) x_scroll ← (number) 0 (volatile byte) y_scroll ← (number) -8 to:main::enableVideoOutput1 -main::enableVideoOutput1: scope:[main] from main::@7 +main::enableVideoOutput1: scope:[main] from main::@6 (byte*~) main::enableVideoOutput1_$2 ← (byte*)(const struct RICOH_2C02*) PPU (byte*~) main::enableVideoOutput1_$0 ← (byte*~) main::enableVideoOutput1_$2 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL *((byte*~) main::enableVideoOutput1_$0) ← (number) $80 (byte*~) main::enableVideoOutput1_$3 ← (byte*)(const struct RICOH_2C02*) PPU (byte*~) main::enableVideoOutput1_$1 ← (byte*~) main::enableVideoOutput1_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK *((byte*~) main::enableVideoOutput1_$1) ← (number) $1e - to:main::@1 -main::@1: scope:[main] from main::@1 main::enableVideoOutput1 - (bool~) main::$8 ← (number) 0 != (number) 1 - if((bool~) main::$8) goto main::@1 + to:main::@7 +main::@7: scope:[main] from main::@7 main::enableVideoOutput1 + (bool~) main::$26 ← (number) 0 != (number) 1 + if((bool~) main::$26) goto main::@7 to:main::@return -main::@return: scope:[main] from main::@1 +main::@return: scope:[main] from main::@7 return to:@return @2: scope:[] from @1 @@ -678,13 +1053,18 @@ SYMBOL TABLE SSA (label) @begin (label) @end (const struct RICOH_2A03*) APU = (struct RICOH_2A03*)(number) $4000 +(const byte) BINARY = (number) 2 (const nomodify byte*) CONIO_SCREEN_TEXT = (const nomodify byte*) PPU_NAME_TABLE_0 +(const byte) DECIMAL = (number) $a +(const byte*) DIGITS[] = (byte*) "0123456789abcdef"z (const nomodify byte*) FR_COUNTER = (byte*)(number) $4017 +(const byte) HEXADECIMAL = (number) $10 (const nomodify byte) JOY_DOWN = (byte) 4 (const nomodify byte) JOY_LEFT = (byte) 2 (const nomodify byte) JOY_RIGHT = (byte) 1 (const nomodify byte) JOY_UP = (byte) 8 (const nomodify byte*) MEMORY = (byte*)(number) 0 +(const byte) OCTAL = (number) 8 (const byte) OFFSET_STRUCT_RICOH_2A03_DMC_FREQ = (byte) $10 (const byte) OFFSET_STRUCT_RICOH_2A03_JOY1 = (byte) $16 (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR = (byte) 6 @@ -699,7 +1079,16 @@ SYMBOL TABLE SSA (const nomodify byte*) PPU_ATTRIBUTE_TABLE_1 = (byte*)(number) $27c0 (const nomodify byte*) PPU_NAME_TABLE_0 = (byte*)(number) $2000 (const nomodify byte*) PPU_PALETTE = (byte*)(number) $3f00 -(const to_volatile byte*) PPU_PPUSTATUS = (byte*)(number) $2002 +(const nomodify to_volatile byte*) PPU_PPUDATA = (byte*)(number) $2007 +(const nomodify to_volatile byte*) PPU_PPUSTATUS = (byte*)(number) $2002 +(const byte) RADIX::BINARY = (number) 2 +(const byte) RADIX::DECIMAL = (number) $a +(const byte) RADIX::HEXADECIMAL = (number) $10 +(const byte) RADIX::OCTAL = (number) 8 +(const byte*) RADIX_BINARY_VALUES_CHAR[] = { (byte) $80, (byte) $40, (byte) $20, (byte) $10, (byte) 8, (byte) 4, (byte) 2 } +(const byte*) RADIX_DECIMAL_VALUES_CHAR[] = { (byte) $64, (byte) $a } +(const byte*) RADIX_HEXADECIMAL_VALUES_CHAR[] = { (byte) $10 } +(const byte*) RADIX_OCTAL_VALUES_CHAR[] = { (byte) $40, (byte) 8 } (byte) RICOH_2A03::DMC_FREQ (byte) RICOH_2A03::DMC_LEN (byte) RICOH_2A03::DMC_RAW @@ -768,6 +1157,30 @@ SYMBOL TABLE SSA (byte) cputc::c#0 (byte) cputc::c#1 (byte) cputc::c#2 +(byte) cputc::c#3 +(void()) cputcxy((byte) cputcxy::x , (byte) cputcxy::y , (byte) cputcxy::c) +(label) cputcxy::@1 +(label) cputcxy::@2 +(label) cputcxy::@return +(byte) cputcxy::c +(byte) cputcxy::c#0 +(byte) cputcxy::c#1 +(byte) cputcxy::c#2 +(byte) cputcxy::c#3 +(byte) cputcxy::c#4 +(byte) cputcxy::c#5 +(byte) cputcxy::x +(byte) cputcxy::x#0 +(byte) cputcxy::x#1 +(byte) cputcxy::x#2 +(byte) cputcxy::x#3 +(byte) cputcxy::x#4 +(byte) cputcxy::y +(byte) cputcxy::y#0 +(byte) cputcxy::y#1 +(byte) cputcxy::y#2 +(byte) cputcxy::y#3 +(byte) cputcxy::y#4 (void()) cputln() (label) cputln::@1 (label) cputln::@return @@ -788,18 +1201,27 @@ SYMBOL TABLE SSA (to_nomodify byte*) cputs::s#3 (to_nomodify byte*) cputs::s#4 (to_nomodify byte*) cputs::s#5 +(void()) cputsxy((byte) cputsxy::x , (byte) cputsxy::y , (to_nomodify byte*) cputsxy::s) +(label) cputsxy::@1 +(label) cputsxy::@2 +(label) cputsxy::@return +(to_nomodify byte*) cputsxy::s +(to_nomodify byte*) cputsxy::s#0 +(to_nomodify byte*) cputsxy::s#1 +(to_nomodify byte*) cputsxy::s#2 +(byte) cputsxy::x +(byte) cputsxy::x#0 +(byte) cputsxy::x#1 +(byte) cputsxy::y +(byte) cputsxy::y#0 +(byte) cputsxy::y#1 (void()) cscroll() (bool~) cscroll::$0 (bool~) cscroll::$1 (bool~) cscroll::$3 -(bool~) cscroll::$4 -(byte~) cscroll::$5 -(bool~) cscroll::$8 +(bool~) cscroll::$7 (label) cscroll::@1 (label) cscroll::@10 -(label) cscroll::@11 -(label) cscroll::@12 -(label) cscroll::@13 (label) cscroll::@2 (label) cscroll::@3 (label) cscroll::@4 @@ -809,8 +1231,6 @@ SYMBOL TABLE SSA (label) cscroll::@8 (label) cscroll::@9 (label) cscroll::@return -(byte) cscroll::ch -(byte) cscroll::ch#0 (byte*) cscroll::line1 (byte*) cscroll::line1#0 (byte*) cscroll::line1#1 @@ -818,9 +1238,6 @@ SYMBOL TABLE SSA (byte*) cscroll::line1#3 (byte*) cscroll::line1#4 (byte*) cscroll::line1#5 -(byte*) cscroll::line1#6 -(byte*) cscroll::line1#7 -(byte*) cscroll::line1#8 (byte*) cscroll::line2 (byte*) cscroll::line2#0 (byte*) cscroll::line2#1 @@ -828,16 +1245,6 @@ SYMBOL TABLE SSA (byte*) cscroll::line2#3 (byte*) cscroll::line2#4 (byte*) cscroll::line2#5 -(byte*) cscroll::line2#6 -(byte*) cscroll::line2#7 -(byte*) cscroll::line2#8 -(byte) cscroll::x -(byte) cscroll::x#0 -(byte) cscroll::x#1 -(byte) cscroll::x#2 -(byte) cscroll::x#3 -(byte) cscroll::x#4 -(byte) cscroll::x#5 (byte) cscroll::y (byte) cscroll::y#0 (byte) cscroll::y#1 @@ -845,9 +1252,6 @@ SYMBOL TABLE SSA (byte) cscroll::y#3 (byte) cscroll::y#4 (byte) cscroll::y#5 -(byte) cscroll::y#6 -(byte) cscroll::y#7 -(byte) cscroll::y#8 (void()) gotoxy((byte) gotoxy::x , (byte) gotoxy::y) (bool~) gotoxy::$0 (bool~) gotoxy::$1 @@ -870,6 +1274,8 @@ SYMBOL TABLE SSA (byte) gotoxy::x#3 (byte) gotoxy::x#4 (byte) gotoxy::x#5 +(byte) gotoxy::x#6 +(byte) gotoxy::x#7 (byte) gotoxy::y (byte) gotoxy::y#0 (byte) gotoxy::y#1 @@ -877,22 +1283,62 @@ SYMBOL TABLE SSA (byte) gotoxy::y#3 (byte) gotoxy::y#4 (byte) gotoxy::y#5 +(byte) gotoxy::y#6 +(byte) gotoxy::y#7 (void()) main() (byte~) main::$1 -(bool~) main::$8 +(byte~) main::$11 +(number~) main::$12 +(byte~) main::$14 +(number~) main::$15 +(bool~) main::$16 +(byte~) main::$18 +(number~) main::$19 +(byte~) main::$21 +(bool~) main::$22 +(number~) main::$23 +(bool~) main::$26 +(byte~) main::$7 +(number~) main::$8 +(bool~) main::$9 (label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@14 +(label) main::@15 +(label) main::@16 +(label) main::@17 +(label) main::@18 +(label) main::@19 (label) main::@2 +(label) main::@20 +(label) main::@21 +(label) main::@22 +(label) main::@23 (label) main::@3 (label) main::@4 (label) main::@5 (label) main::@6 (label) main::@7 +(label) main::@8 +(label) main::@9 (label) main::@return (label) main::enableVideoOutput1 (byte*~) main::enableVideoOutput1_$0 (byte*~) main::enableVideoOutput1_$1 (byte*~) main::enableVideoOutput1_$2 (byte*~) main::enableVideoOutput1_$3 +(byte) main::i +(byte) main::i#0 +(byte) main::i#1 +(byte) main::i#2 +(byte) main::i#3 +(byte) main::i#4 +(byte) main::i#5 +(byte) main::i#6 +(byte) main::i#7 (label) main::initNES1 (bool~) main::initNES1_$5 (label) main::initNES1_@1 @@ -925,11 +1371,123 @@ SYMBOL TABLE SSA (byte*~) main::initNES1_waitForVBlank2_$3 (bool~) main::initNES1_waitForVBlank2_$4 (label) main::initNES1_waitForVBlank2_@1 -(const byte*) main::s[(byte) $25] = (byte*) "hello world! -i am nes - look at me - -" +(label) main::screensizex1 +(label) main::screensizex1_@return +(byte) main::screensizex1_return +(byte) main::screensizex1_return#0 +(byte) main::screensizex1_return#1 +(byte) main::screensizex1_return#2 +(byte) main::screensizex1_return#3 +(label) main::screensizex2 +(label) main::screensizex2_@return +(byte) main::screensizex2_return +(byte) main::screensizex2_return#0 +(byte) main::screensizex2_return#1 +(byte) main::screensizex2_return#2 +(byte) main::screensizex2_return#3 +(label) main::screensizey1 +(label) main::screensizey1_@return +(byte) main::screensizey1_return +(byte) main::screensizey1_return#0 +(byte) main::screensizey1_return#1 +(byte) main::screensizey1_return#2 +(byte) main::screensizey1_return#3 +(label) main::screensizey2 +(label) main::screensizey2_@return +(byte) main::screensizey2_return +(byte) main::screensizey2_return#0 +(byte) main::screensizey2_return#1 +(byte) main::screensizey2_return#2 +(byte) main::screensizey2_return#3 +(label) main::screensizey3 +(label) main::screensizey3_@return +(byte) main::screensizey3_return +(byte) main::screensizey3_return#0 +(byte) main::screensizey3_return#1 +(byte) main::screensizey3_return#2 +(byte) main::screensizey3_return#3 +(byte) main::x +(byte) main::x#0 +(byte) main::x#1 +(byte) main::x#10 +(byte) main::x#2 +(byte) main::x#3 +(byte) main::x#4 +(byte) main::x#5 +(byte) main::x#6 +(byte) main::x#7 +(byte) main::x#8 +(byte) main::x#9 +(byte) main::y +(byte) main::y#0 +(byte) main::y#1 +(byte) main::y#10 +(byte) main::y#2 +(byte) main::y#3 +(byte) main::y#4 +(byte) main::y#5 +(byte) main::y#6 +(byte) main::y#7 +(byte) main::y#8 +(byte) main::y#9 +(const byte*) num_buffer[(number) $b] = { fill( $b, 0) } +(void()) ppuDataFetch((nomodify void*) ppuDataFetch::cpuData , (nomodify void*) ppuDataFetch::ppuData , (word) ppuDataFetch::size) +(bool~) ppuDataFetch::$1 +(byte~) ppuDataFetch::$2 +(label) ppuDataFetch::@1 +(label) ppuDataFetch::@2 +(label) ppuDataFetch::@3 +(label) ppuDataFetch::@return +(nomodify void*) ppuDataFetch::cpuData +(nomodify void*) ppuDataFetch::cpuData#0 +(nomodify void*) ppuDataFetch::cpuData#1 +(nomodify void*) ppuDataFetch::cpuData#2 +(nomodify void*) ppuDataFetch::cpuData#3 +(byte*) ppuDataFetch::cpuDst +(byte*) ppuDataFetch::cpuDst#0 +(byte*) ppuDataFetch::cpuDst#1 +(byte*) ppuDataFetch::cpuDst#2 +(byte*) ppuDataFetch::cpuDst#3 +(byte*) ppuDataFetch::cpuDst#4 +(byte*) ppuDataFetch::cpuDst#5 +(word) ppuDataFetch::i +(word) ppuDataFetch::i#0 +(word) ppuDataFetch::i#1 +(word) ppuDataFetch::i#2 +(word) ppuDataFetch::i#3 +(word) ppuDataFetch::i#4 +(word) ppuDataFetch::i#5 +(nomodify void*) ppuDataFetch::ppuData +(nomodify void*) ppuDataFetch::ppuData#0 +(nomodify void*) ppuDataFetch::ppuData#1 +(label) ppuDataFetch::ppuDataPrepare1 +(byte~) ppuDataFetch::ppuDataPrepare1_$0 +(byte~) ppuDataFetch::ppuDataPrepare1_$1 +(byte*~) ppuDataFetch::ppuDataPrepare1_$2 +(byte*~) ppuDataFetch::ppuDataPrepare1_$3 +(byte*~) ppuDataFetch::ppuDataPrepare1_$4 +(byte*~) ppuDataFetch::ppuDataPrepare1_$5 +(nomodify void*) ppuDataFetch::ppuDataPrepare1_ppuData +(nomodify void*) ppuDataFetch::ppuDataPrepare1_ppuData#0 +(nomodify void*) ppuDataFetch::ppuDataPrepare1_ppuData#1 +(label) ppuDataFetch::ppuDataRead1 +(byte*~) ppuDataFetch::ppuDataRead1_$0 +(byte*~) ppuDataFetch::ppuDataRead1_$1 +(label) ppuDataFetch::ppuDataRead1_@return +(byte) ppuDataFetch::ppuDataRead1_return +(byte) ppuDataFetch::ppuDataRead1_return#0 +(byte) ppuDataFetch::ppuDataRead1_return#1 +(byte) ppuDataFetch::ppuDataRead1_return#2 +(byte) ppuDataFetch::ppuDataRead1_return#3 +(word) ppuDataFetch::size +(word) ppuDataFetch::size#0 +(word) ppuDataFetch::size#1 +(word) ppuDataFetch::size#2 +(word) ppuDataFetch::size#3 +(word) ppuDataFetch::size#4 +(word) ppuDataFetch::size#5 +(word) ppuDataFetch::size#6 +(word) ppuDataFetch::size#7 (void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) (bool~) ppuDataFill::$1 (label) ppuDataFill::@1 @@ -990,45 +1548,12 @@ i am nes (byte) ppuDataFill::val#7 (byte) ppuDataFill::val#8 (byte) ppuDataFill::val#9 -(byte()) ppuDataGet((nomodify void*) ppuDataGet::ppuData) -(byte~) ppuDataGet::$1 -(label) ppuDataGet::@1 -(label) ppuDataGet::@return -(nomodify void*) ppuDataGet::ppuData -(nomodify void*) ppuDataGet::ppuData#0 -(nomodify void*) ppuDataGet::ppuData#1 -(label) ppuDataGet::ppuDataPrepare1 -(byte~) ppuDataGet::ppuDataPrepare1_$0 -(byte~) ppuDataGet::ppuDataPrepare1_$1 -(byte*~) ppuDataGet::ppuDataPrepare1_$2 -(byte*~) ppuDataGet::ppuDataPrepare1_$3 -(byte*~) ppuDataGet::ppuDataPrepare1_$4 -(byte*~) ppuDataGet::ppuDataPrepare1_$5 -(nomodify void*) ppuDataGet::ppuDataPrepare1_ppuData -(nomodify void*) ppuDataGet::ppuDataPrepare1_ppuData#0 -(nomodify void*) ppuDataGet::ppuDataPrepare1_ppuData#1 -(label) ppuDataGet::ppuDataRead1 -(byte*~) ppuDataGet::ppuDataRead1_$0 -(byte*~) ppuDataGet::ppuDataRead1_$1 -(label) ppuDataGet::ppuDataRead1_@return -(byte) ppuDataGet::ppuDataRead1_return -(byte) ppuDataGet::ppuDataRead1_return#0 -(byte) ppuDataGet::ppuDataRead1_return#1 -(byte) ppuDataGet::ppuDataRead1_return#2 -(byte) ppuDataGet::ppuDataRead1_return#3 -(byte) ppuDataGet::return -(byte) ppuDataGet::return#0 -(byte) ppuDataGet::return#1 -(byte) ppuDataGet::return#2 -(byte) ppuDataGet::return#3 -(byte) ppuDataGet::return#4 (void()) ppuDataSet((nomodify void*) ppuDataSet::ppuData , (byte) ppuDataSet::val) (label) ppuDataSet::@1 (label) ppuDataSet::@return (nomodify void*) ppuDataSet::ppuData (nomodify void*) ppuDataSet::ppuData#0 (nomodify void*) ppuDataSet::ppuData#1 -(nomodify void*) ppuDataSet::ppuData#2 (label) ppuDataSet::ppuDataPrepare1 (byte~) ppuDataSet::ppuDataPrepare1_$0 (byte~) ppuDataSet::ppuDataPrepare1_$1 @@ -1050,7 +1575,6 @@ i am nes (byte) ppuDataSet::val#1 (byte) ppuDataSet::val#2 (byte) ppuDataSet::val#3 -(byte) ppuDataSet::val#4 (void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size) (bool~) ppuDataTransfer::$1 (label) ppuDataTransfer::@1 @@ -1063,6 +1587,7 @@ i am nes (nomodify void*) ppuDataTransfer::cpuData#1 (nomodify void*) ppuDataTransfer::cpuData#2 (nomodify void*) ppuDataTransfer::cpuData#3 +(nomodify void*) ppuDataTransfer::cpuData#4 (byte*) ppuDataTransfer::cpuSrc (byte*) ppuDataTransfer::cpuSrc#0 (byte*) ppuDataTransfer::cpuSrc#1 @@ -1080,6 +1605,7 @@ i am nes (nomodify void*) ppuDataTransfer::ppuData (nomodify void*) ppuDataTransfer::ppuData#0 (nomodify void*) ppuDataTransfer::ppuData#1 +(nomodify void*) ppuDataTransfer::ppuData#2 (label) ppuDataTransfer::ppuDataPrepare1 (byte~) ppuDataTransfer::ppuDataPrepare1_$0 (byte~) ppuDataTransfer::ppuDataPrepare1_$1 @@ -1105,6 +1631,17 @@ i am nes (word) ppuDataTransfer::size#5 (word) ppuDataTransfer::size#6 (word) ppuDataTransfer::size#7 +(word) ppuDataTransfer::size#8 +(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) } +(byte) printf_buffer_number::sign +(byte) printf_format_number::justify_left +(byte) printf_format_number::min_length +(byte) printf_format_number::radix +(byte) printf_format_number::sign_always +(byte) printf_format_number::upper_case +(byte) printf_format_number::zero_padding +(byte) printf_format_string::justify_left +(byte) printf_format_string::min_length (byte()) readJoy1() (bool~) readJoy1::$0 (byte~) readJoy1::$1 @@ -1137,6 +1674,158 @@ i am nes (byte) readJoy1::return#2 (byte) readJoy1::return#3 (byte) readJoy1::return#4 +(const byte*) scroll_buffer[(number) $20] = { fill( $20, 0) } +(void()) uctoa((byte) uctoa::value , (byte*) uctoa::buffer , (byte) uctoa::radix) +(bool~) uctoa::$0 +(bool~) uctoa::$1 +(byte~) uctoa::$10 +(bool~) uctoa::$2 +(bool~) uctoa::$3 +(number~) uctoa::$4 +(bool~) uctoa::$5 +(bool~) uctoa::$6 +(bool~) uctoa::$7 +(bool~) uctoa::$8 +(byte~) uctoa::$9 +(label) uctoa::@1 +(label) uctoa::@10 +(label) uctoa::@11 +(label) uctoa::@12 +(label) uctoa::@13 +(label) uctoa::@14 +(label) uctoa::@15 +(label) uctoa::@2 +(label) uctoa::@3 +(label) uctoa::@4 +(label) uctoa::@5 +(label) uctoa::@6 +(label) uctoa::@7 +(label) uctoa::@8 +(label) uctoa::@9 +(label) uctoa::@return +(byte*) uctoa::buffer +(byte*) uctoa::buffer#0 +(byte*) uctoa::buffer#1 +(byte*) uctoa::buffer#10 +(byte*) uctoa::buffer#11 +(byte*) uctoa::buffer#12 +(byte*) uctoa::buffer#13 +(byte*) uctoa::buffer#14 +(byte*) uctoa::buffer#15 +(byte*) uctoa::buffer#16 +(byte*) uctoa::buffer#17 +(byte*) uctoa::buffer#18 +(byte*) uctoa::buffer#19 +(byte*) uctoa::buffer#2 +(byte*) uctoa::buffer#20 +(byte*) uctoa::buffer#21 +(byte*) uctoa::buffer#3 +(byte*) uctoa::buffer#4 +(byte*) uctoa::buffer#5 +(byte*) uctoa::buffer#6 +(byte*) uctoa::buffer#7 +(byte*) uctoa::buffer#8 +(byte*) uctoa::buffer#9 +(byte) uctoa::digit +(byte) uctoa::digit#0 +(byte) uctoa::digit#1 +(byte) uctoa::digit#2 +(byte) uctoa::digit#3 +(byte) uctoa::digit#4 +(byte) uctoa::digit#5 +(byte) uctoa::digit#6 +(byte) uctoa::digit_value +(byte) uctoa::digit_value#0 +(byte) uctoa::digit_value#1 +(byte*) uctoa::digit_values +(byte*) uctoa::digit_values#0 +(byte*) uctoa::digit_values#1 +(byte*) uctoa::digit_values#10 +(byte*) uctoa::digit_values#2 +(byte*) uctoa::digit_values#3 +(byte*) uctoa::digit_values#4 +(byte*) uctoa::digit_values#5 +(byte*) uctoa::digit_values#6 +(byte*) uctoa::digit_values#7 +(byte*) uctoa::digit_values#8 +(byte*) uctoa::digit_values#9 +(byte) uctoa::max_digits +(byte) uctoa::max_digits#0 +(byte) uctoa::max_digits#1 +(byte) uctoa::max_digits#10 +(byte) uctoa::max_digits#2 +(byte) uctoa::max_digits#3 +(byte) uctoa::max_digits#4 +(byte) uctoa::max_digits#5 +(byte) uctoa::max_digits#6 +(byte) uctoa::max_digits#7 +(byte) uctoa::max_digits#8 +(byte) uctoa::max_digits#9 +(byte) uctoa::radix +(byte) uctoa::radix#0 +(byte) uctoa::radix#1 +(byte) uctoa::radix#2 +(byte) uctoa::radix#3 +(byte) uctoa::radix#4 +(byte) uctoa::started +(byte) uctoa::started#0 +(byte) uctoa::started#1 +(byte) uctoa::started#2 +(byte) uctoa::started#3 +(byte) uctoa::started#4 +(byte) uctoa::value +(byte) uctoa::value#0 +(byte) uctoa::value#1 +(byte) uctoa::value#10 +(byte) uctoa::value#11 +(byte) uctoa::value#12 +(byte) uctoa::value#13 +(byte) uctoa::value#14 +(byte) uctoa::value#15 +(byte) uctoa::value#2 +(byte) uctoa::value#3 +(byte) uctoa::value#4 +(byte) uctoa::value#5 +(byte) uctoa::value#6 +(byte) uctoa::value#7 +(byte) uctoa::value#8 +(byte) uctoa::value#9 +(byte()) uctoa_append((byte*) uctoa_append::buffer , (byte) uctoa_append::value , (byte) uctoa_append::sub) +(bool~) uctoa_append::$0 +(label) uctoa_append::@1 +(label) uctoa_append::@2 +(label) uctoa_append::@3 +(label) uctoa_append::@return +(byte*) uctoa_append::buffer +(byte*) uctoa_append::buffer#0 +(byte*) uctoa_append::buffer#1 +(byte*) uctoa_append::buffer#2 +(byte*) uctoa_append::buffer#3 +(byte*) uctoa_append::buffer#4 +(byte) uctoa_append::digit +(byte) uctoa_append::digit#0 +(byte) uctoa_append::digit#1 +(byte) uctoa_append::digit#2 +(byte) uctoa_append::digit#3 +(byte) uctoa_append::digit#4 +(byte) uctoa_append::return +(byte) uctoa_append::return#0 +(byte) uctoa_append::return#1 +(byte) uctoa_append::return#2 +(byte) uctoa_append::return#3 +(byte) uctoa_append::return#4 +(byte) uctoa_append::sub +(byte) uctoa_append::sub#0 +(byte) uctoa_append::sub#1 +(byte) uctoa_append::sub#2 +(byte) uctoa_append::sub#3 +(byte) uctoa_append::value +(byte) uctoa_append::value#0 +(byte) uctoa_append::value#1 +(byte) uctoa_append::value#2 +(byte) uctoa_append::value#3 +(byte) uctoa_append::value#4 +(byte) uctoa_append::value#5 interrupt(HARDWARE_STACK)(void()) vblank() (byte~) vblank::$0 (byte~) vblank::$1 @@ -1194,8 +1883,8 @@ Adding number conversion cast (unumber) readJoy1::$3 in (number~) readJoy1::$3 Adding number conversion cast (unumber) $3c0 in (word) ppuDataFill::size#0 ← (number) $3c0 Adding number conversion cast (unumber) 0 in (byte) conio_cursor_x ← (number) 0 Adding number conversion cast (unumber) 0 in (byte) conio_cursor_y ← (number) 0 -Adding number conversion cast (unumber) $1e in (bool~) gotoxy::$0 ← (byte) gotoxy::y#2 > (number) $1e -Adding number conversion cast (unumber) $20 in (bool~) gotoxy::$2 ← (byte) gotoxy::x#2 >= (number) $20 +Adding number conversion cast (unumber) $1e in (bool~) gotoxy::$0 ← (byte) gotoxy::y#4 > (number) $1e +Adding number conversion cast (unumber) $20 in (bool~) gotoxy::$2 ← (byte) gotoxy::x#4 >= (number) $20 Adding number conversion cast (unumber) 0 in (byte) gotoxy::y#0 ← (number) 0 Adding number conversion cast (unumber) $20 in (number~) gotoxy::$4 ← (word~) gotoxy::$6 * (number) $20 Adding number conversion cast (unumber) gotoxy::$4 in (number~) gotoxy::$4 ← (word~) gotoxy::$6 * (unumber)(number) $20 @@ -1204,17 +1893,29 @@ Adding number conversion cast (unumber) $20 in (bool~) cputc::$3 ← (byte) coni Adding number conversion cast (unumber) $20 in (byte*) conio_line_text ← (byte*) conio_line_text + (number) $20 Adding number conversion cast (unumber) 0 in (byte) conio_cursor_x ← (number) 0 Adding number conversion cast (unumber) $1e in (bool~) cscroll::$0 ← (byte) conio_cursor_y == (number) $1e -Adding number conversion cast (unumber) 0 in (bool~) cscroll::$8 ← (number) 0 != (byte) conio_scroll_enable +Adding number conversion cast (unumber) 0 in (bool~) cscroll::$7 ← (number) 0 != (byte) conio_scroll_enable Adding number conversion cast (unumber) $20 in (byte*) cscroll::line2#0 ← (const nomodify byte*) CONIO_SCREEN_TEXT+(number) $20 Adding number conversion cast (unumber) 0 in (byte) gotoxy::x#1 ← (number) 0 Adding number conversion cast (unumber) 0 in (byte) gotoxy::y#1 ← (number) 0 Adding number conversion cast (unumber) $1e-1 in (bool~) cscroll::$3 ← (byte) cscroll::y#2 < (number) $1e-(number) 1 +Adding number conversion cast (unumber) $20 in (word) ppuDataFetch::size#0 ← (number) $20 +Adding number conversion cast (unumber) $20 in (word) ppuDataTransfer::size#0 ← (number) $20 +Adding number conversion cast (unumber) $20 in (byte*) cscroll::line1#1 ← (byte*) cscroll::line1#3 + (number) $20 +Adding number conversion cast (unumber) $20 in (byte*) cscroll::line2#1 ← (byte*) cscroll::line2#3 + (number) $20 Adding number conversion cast (unumber) $20 in (nomodify void*) ppuDataFill::ppuData#1 ← (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(number) $1e*(number) $20-(number) $20 Adding number conversion cast (unumber) $1e*$20 in (nomodify void*) ppuDataFill::ppuData#1 ← (void*)(const nomodify byte*) CONIO_SCREEN_TEXT+(number) $1e*(number) $20-(unumber)(number) $20 Adding number conversion cast (unumber) $20 in (word) ppuDataFill::size#1 ← (number) $20 Adding number conversion cast (unumber) $20 in (byte*) conio_line_text ← (byte*) conio_line_text - (number) $20 -Adding number conversion cast (unumber) $20 in (bool~) cscroll::$4 ← (byte) cscroll::x#2 < (number) $20 Adding number conversion cast (unumber) 0 in (bool~) cputs::$1 ← (number) 0 != (byte) cputs::c#1 +Adding number conversion cast (unumber) 3 in (byte) uctoa::max_digits#1 ← (number) 3 +Adding number conversion cast (unumber) 2 in (byte) uctoa::max_digits#2 ← (number) 2 +Adding number conversion cast (unumber) 3 in (byte) uctoa::max_digits#3 ← (number) 3 +Adding number conversion cast (unumber) 8 in (byte) uctoa::max_digits#4 ← (number) 8 +Adding number conversion cast (unumber) 0 in *((byte*) uctoa::buffer#2) ← (number) 0 +Adding number conversion cast (unumber) 1 in (number~) uctoa::$4 ← (byte) uctoa::max_digits#5 - (number) 1 +Adding number conversion cast (unumber) uctoa::$4 in (number~) uctoa::$4 ← (byte) uctoa::max_digits#5 - (unumber)(number) 1 +Adding number conversion cast (unumber) 0 in *((byte*) uctoa::buffer#3) ← (number) 0 +Adding number conversion cast (unumber) 1 in (byte) uctoa::started#1 ← (number) 1 Adding number conversion cast (unumber) 0 in *((byte*~) main::initNES1_disableVideoOutput1_$0) ← (number) 0 Adding number conversion cast (unumber) 0 in *((byte*~) main::initNES1_disableVideoOutput1_$1) ← (number) 0 Adding number conversion cast (unumber) $40 in *((const nomodify byte*) FR_COUNTER) ← (number) $40 @@ -1246,6 +1947,23 @@ Adding number conversion cast (unumber) 0 in (byte) ppuDataFill::val#2 ← (numb Adding number conversion cast (unumber) $40 in (word) ppuDataFill::size#2 ← (number) $40 Adding number conversion cast (unumber) 0 in (byte) ppuDataFill::val#3 ← (number) 0 Adding number conversion cast (unumber) $40 in (word) ppuDataFill::size#3 ← (number) $40 +Adding number conversion cast (unumber) $20 in (byte) main::screensizex1_return#0 ← (number) $20 +Adding number conversion cast (unumber) 1 in (number~) main::$8 ← (byte~) main::$7 - (number) 1 +Adding number conversion cast (unumber) main::$8 in (number~) main::$8 ← (byte~) main::$7 - (unumber)(number) 1 +Adding number conversion cast (unumber) 1 in (byte) cputcxy::y#0 ← (number) 1 +Adding number conversion cast (unumber) $1e in (byte) main::screensizey1_return#0 ← (number) $1e +Adding number conversion cast (unumber) 4 in (number~) main::$12 ← (byte~) main::$11 - (number) 4 +Adding number conversion cast (unumber) main::$12 in (number~) main::$12 ← (byte~) main::$11 - (unumber)(number) 4 +Adding number conversion cast (unumber) $1e in (byte) main::screensizey2_return#0 ← (number) $1e +Adding number conversion cast (unumber) 3 in (number~) main::$15 ← (byte~) main::$14 - (number) 3 +Adding number conversion cast (unumber) main::$15 in (number~) main::$15 ← (byte~) main::$14 - (unumber)(number) 3 +Adding number conversion cast (unumber) 1 in (byte) cputcxy::x#2 ← (number) 1 +Adding number conversion cast (unumber) $20 in (byte) main::screensizex2_return#0 ← (number) $20 +Adding number conversion cast (unumber) 2 in (number~) main::$19 ← (byte~) main::$18 - (number) 2 +Adding number conversion cast (unumber) main::$19 in (number~) main::$19 ← (byte~) main::$18 - (unumber)(number) 2 +Adding number conversion cast (unumber) $1e in (byte) main::screensizey3_return#0 ← (number) $1e +Adding number conversion cast (unumber) $f in (number~) main::$23 ← (byte) main::i#3 & (number) $f +Adding number conversion cast (unumber) main::$23 in (number~) main::$23 ← (byte) main::i#3 & (unumber)(number) $f Adding number conversion cast (unumber) 0 in (volatile byte) x_scroll ← (number) 0 Adding number conversion cast (unumber) -8 in (volatile byte) y_scroll ← (number) -8 Adding number conversion cast (unumber) $80 in *((byte*~) main::enableVideoOutput1_$0) ← (number) $80 @@ -1269,7 +1987,16 @@ Inlining cast (byte) gotoxy::x#0 ← (unumber)(number) 0 Inlining cast (byte) conio_cursor_x ← (unumber)(number) 0 Inlining cast (byte) gotoxy::x#1 ← (unumber)(number) 0 Inlining cast (byte) gotoxy::y#1 ← (unumber)(number) 0 +Inlining cast (word) ppuDataFetch::size#0 ← (unumber)(number) $20 +Inlining cast (word) ppuDataTransfer::size#0 ← (unumber)(number) $20 Inlining cast (word) ppuDataFill::size#1 ← (unumber)(number) $20 +Inlining cast (byte) uctoa::max_digits#1 ← (unumber)(number) 3 +Inlining cast (byte) uctoa::max_digits#2 ← (unumber)(number) 2 +Inlining cast (byte) uctoa::max_digits#3 ← (unumber)(number) 3 +Inlining cast (byte) uctoa::max_digits#4 ← (unumber)(number) 8 +Inlining cast *((byte*) uctoa::buffer#2) ← (unumber)(number) 0 +Inlining cast *((byte*) uctoa::buffer#3) ← (unumber)(number) 0 +Inlining cast (byte) uctoa::started#1 ← (unumber)(number) 1 Inlining cast *((byte*~) main::initNES1_disableVideoOutput1_$0) ← (unumber)(number) 0 Inlining cast *((byte*~) main::initNES1_disableVideoOutput1_$1) ← (unumber)(number) 0 Inlining cast *((const nomodify byte*) FR_COUNTER) ← (unumber)(number) $40 @@ -1286,6 +2013,13 @@ Inlining cast (byte) ppuDataFill::val#2 ← (unumber)(number) 0 Inlining cast (word) ppuDataFill::size#2 ← (unumber)(number) $40 Inlining cast (byte) ppuDataFill::val#3 ← (unumber)(number) 0 Inlining cast (word) ppuDataFill::size#3 ← (unumber)(number) $40 +Inlining cast (byte) main::screensizex1_return#0 ← (unumber)(number) $20 +Inlining cast (byte) cputcxy::y#0 ← (unumber)(number) 1 +Inlining cast (byte) main::screensizey1_return#0 ← (unumber)(number) $1e +Inlining cast (byte) main::screensizey2_return#0 ← (unumber)(number) $1e +Inlining cast (byte) cputcxy::x#2 ← (unumber)(number) 1 +Inlining cast (byte) main::screensizex2_return#0 ← (unumber)(number) $20 +Inlining cast (byte) main::screensizey3_return#0 ← (unumber)(number) $1e Inlining cast (volatile byte) x_scroll ← (unumber)(number) 0 Inlining cast (volatile byte) y_scroll ← (unumber)(number) -8 Inlining cast *((byte*~) main::enableVideoOutput1_$0) ← (unumber)(number) $80 @@ -1297,10 +2031,11 @@ Simplifying constant pointer cast (byte*) 8192 Simplifying constant pointer cast (byte*) 9152 Simplifying constant pointer cast (byte*) 10176 Simplifying constant pointer cast (byte*) 16128 +Simplifying constant pointer cast (byte*) 8194 +Simplifying constant pointer cast (byte*) 8199 Simplifying constant pointer cast (byte*) 16407 Simplifying constant pointer cast (byte*) 0 Simplifying constant pointer cast (void()*) 0 -Simplifying constant pointer cast (byte*) 8194 Simplifying constant pointer cast (struct RICOH_2C02*) 8192 Simplifying constant pointer cast (struct RICOH_2A03*) 16384 Simplifying constant integer cast 1 @@ -1328,7 +2063,19 @@ Simplifying constant integer cast $20 Simplifying constant integer cast $20 Simplifying constant integer cast $20 Simplifying constant integer cast $20 +Simplifying constant integer cast $20 +Simplifying constant integer cast $20 +Simplifying constant integer cast $20 Simplifying constant integer cast 0 +Simplifying constant integer cast 3 +Simplifying constant integer cast 2 +Simplifying constant integer cast 3 +Simplifying constant integer cast 8 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 +Simplifying constant integer cast (byte) uctoa::value#3 +Simplifying constant integer cast 0 +Simplifying constant integer cast 1 Simplifying constant integer cast 0 Simplifying constant integer cast 0 Simplifying constant integer cast $40 @@ -1358,6 +2105,18 @@ Simplifying constant integer cast 0 Simplifying constant integer cast $40 Simplifying constant integer cast 0 Simplifying constant integer cast $40 +Simplifying constant integer cast $20 +Simplifying constant integer cast 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast $1e +Simplifying constant integer cast 4 +Simplifying constant integer cast $1e +Simplifying constant integer cast 3 +Simplifying constant integer cast 1 +Simplifying constant integer cast $20 +Simplifying constant integer cast 2 +Simplifying constant integer cast $1e +Simplifying constant integer cast $f Simplifying constant integer cast 0 Simplifying constant integer cast -8 Simplifying constant integer cast $80 @@ -1396,7 +2155,18 @@ Finalized unsigned number type (byte) $20 Finalized unsigned number type (byte) $20 Finalized unsigned number type (byte) $20 Finalized unsigned number type (byte) $20 +Finalized unsigned number type (byte) $20 +Finalized unsigned number type (byte) $20 +Finalized unsigned number type (byte) $20 Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (byte) 8 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Finalized unsigned number type (byte) 1 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) $40 @@ -1426,6 +2196,18 @@ Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) $40 Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) $40 +Finalized unsigned number type (byte) $20 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $1e +Finalized unsigned number type (byte) 4 +Finalized unsigned number type (byte) $1e +Finalized unsigned number type (byte) 3 +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) $20 +Finalized unsigned number type (byte) 2 +Finalized unsigned number type (byte) $1e +Finalized unsigned number type (byte) $f Finalized unsigned number type (byte) 0 Finalized unsigned number type (byte) -8 Finalized unsigned number type (byte) $80 @@ -1442,20 +2224,26 @@ Successful SSA optimization PassNFinalizeNumberTypeConversions Inferred type updated to byte in (unumber~) readJoy1::$2 ← *((byte*~) readJoy1::$6) & (byte) 1 Inferred type updated to byte in (unumber~) readJoy1::$3 ← (byte~) readJoy1::$1 | (byte~) readJoy1::$2 Inferred type updated to word in (unumber~) gotoxy::$4 ← (word~) gotoxy::$6 * (byte) $20 +Inferred type updated to byte in (unumber~) uctoa::$4 ← (byte) uctoa::max_digits#5 - (byte) 1 Inferred type updated to byte in (unumber~) main::initNES1_waitForVBlank1_$0 ← *((byte*~) main::initNES1_waitForVBlank1_$2) & (byte) $80 Inferred type updated to byte in (unumber~) main::initNES1_waitForVBlank2_$0 ← *((byte*~) main::initNES1_waitForVBlank2_$2) & (byte) $80 -Inversing boolean not [130] (bool~) gotoxy::$1 ← (byte) gotoxy::y#2 <= (byte) $1e from [129] (bool~) gotoxy::$0 ← (byte) gotoxy::y#2 > (byte) $1e -Inversing boolean not [134] (bool~) gotoxy::$3 ← (byte) gotoxy::x#2 < (byte) $20 from [133] (bool~) gotoxy::$2 ← (byte) gotoxy::x#2 >= (byte) $20 -Inversing boolean not [160] (bool~) cputc::$4 ← (byte) conio_cursor_x != (byte) $20 from [159] (bool~) cputc::$3 ← (byte) conio_cursor_x == (byte) $20 -Inversing boolean not [170] (bool~) cscroll::$1 ← (byte) conio_cursor_y != (byte) $1e from [169] (bool~) cscroll::$0 ← (byte) conio_cursor_y == (byte) $1e -Inversing boolean not [239] (bool~) main::initNES1_waitForVBlank1_$1 ← (byte) 0 == (byte~) main::initNES1_waitForVBlank1_$0 from [238] (bool~) main::initNES1_waitForVBlank1_$4 ← (byte) 0 != (byte~) main::initNES1_waitForVBlank1_$0 -Inversing boolean not [258] (bool~) main::initNES1_waitForVBlank2_$1 ← (byte) 0 == (byte~) main::initNES1_waitForVBlank2_$0 from [257] (bool~) main::initNES1_waitForVBlank2_$4 ← (byte) 0 != (byte~) main::initNES1_waitForVBlank2_$0 -Inversing boolean not [297] (bool~) vblank::$2 ← (byte) 0 == (byte~) vblank::$1 from [296] (bool~) vblank::$17 ← (byte) 0 != (byte~) vblank::$1 -Inversing boolean not [302] (bool~) vblank::$4 ← (byte) 0 == (byte~) vblank::$3 from [301] (bool~) vblank::$18 ← (byte) 0 != (byte~) vblank::$3 -Inversing boolean not [307] (bool~) vblank::$10 ← (volatile byte) y_scroll != (byte) $f0 from [306] (bool~) vblank::$9 ← (volatile byte) y_scroll == (byte) $f0 -Inversing boolean not [314] (bool~) vblank::$6 ← (byte) 0 == (byte~) vblank::$5 from [313] (bool~) vblank::$19 ← (byte) 0 != (byte~) vblank::$5 -Inversing boolean not [319] (bool~) vblank::$12 ← (volatile byte) y_scroll != (byte) $ff from [318] (bool~) vblank::$11 ← (volatile byte) y_scroll == (byte) $ff -Inversing boolean not [326] (bool~) vblank::$8 ← (byte) 0 == (byte~) vblank::$7 from [325] (bool~) vblank::$20 ← (byte) 0 != (byte~) vblank::$7 +Inferred type updated to byte in (unumber~) main::$8 ← (byte~) main::$7 - (byte) 1 +Inferred type updated to byte in (unumber~) main::$12 ← (byte~) main::$11 - (byte) 4 +Inferred type updated to byte in (unumber~) main::$15 ← (byte~) main::$14 - (byte) 3 +Inferred type updated to byte in (unumber~) main::$19 ← (byte~) main::$18 - (byte) 2 +Inferred type updated to byte in (unumber~) main::$23 ← (byte) main::i#3 & (byte) $f +Inversing boolean not [138] (bool~) gotoxy::$1 ← (byte) gotoxy::y#4 <= (byte) $1e from [137] (bool~) gotoxy::$0 ← (byte) gotoxy::y#4 > (byte) $1e +Inversing boolean not [142] (bool~) gotoxy::$3 ← (byte) gotoxy::x#4 < (byte) $20 from [141] (bool~) gotoxy::$2 ← (byte) gotoxy::x#4 >= (byte) $20 +Inversing boolean not [168] (bool~) cputc::$4 ← (byte) conio_cursor_x != (byte) $20 from [167] (bool~) cputc::$3 ← (byte) conio_cursor_x == (byte) $20 +Inversing boolean not [178] (bool~) cscroll::$1 ← (byte) conio_cursor_y != (byte) $1e from [177] (bool~) cscroll::$0 ← (byte) conio_cursor_y == (byte) $1e +Inversing boolean not [336] (bool~) main::initNES1_waitForVBlank1_$1 ← (byte) 0 == (byte~) main::initNES1_waitForVBlank1_$0 from [335] (bool~) main::initNES1_waitForVBlank1_$4 ← (byte) 0 != (byte~) main::initNES1_waitForVBlank1_$0 +Inversing boolean not [355] (bool~) main::initNES1_waitForVBlank2_$1 ← (byte) 0 == (byte~) main::initNES1_waitForVBlank2_$0 from [354] (bool~) main::initNES1_waitForVBlank2_$4 ← (byte) 0 != (byte~) main::initNES1_waitForVBlank2_$0 +Inversing boolean not [472] (bool~) vblank::$2 ← (byte) 0 == (byte~) vblank::$1 from [471] (bool~) vblank::$17 ← (byte) 0 != (byte~) vblank::$1 +Inversing boolean not [477] (bool~) vblank::$4 ← (byte) 0 == (byte~) vblank::$3 from [476] (bool~) vblank::$18 ← (byte) 0 != (byte~) vblank::$3 +Inversing boolean not [482] (bool~) vblank::$10 ← (volatile byte) y_scroll != (byte) $f0 from [481] (bool~) vblank::$9 ← (volatile byte) y_scroll == (byte) $f0 +Inversing boolean not [489] (bool~) vblank::$6 ← (byte) 0 == (byte~) vblank::$5 from [488] (bool~) vblank::$19 ← (byte) 0 != (byte~) vblank::$5 +Inversing boolean not [494] (bool~) vblank::$12 ← (volatile byte) y_scroll != (byte) $ff from [493] (bool~) vblank::$11 ← (volatile byte) y_scroll == (byte) $ff +Inversing boolean not [501] (bool~) vblank::$8 ← (byte) 0 == (byte~) vblank::$7 from [500] (bool~) vblank::$20 ← (byte) 0 != (byte~) vblank::$7 Successful SSA optimization Pass2UnaryNotSimplification Alias candidate removed (volatile)conio_line_text = gotoxy::$5 Alias readJoy1::joy#2 = readJoy1::joy#4 readJoy1::joy#3 readJoy1::return#0 readJoy1::return#3 readJoy1::return#1 @@ -1467,82 +2255,138 @@ Alias ppuDataFill::val#10 = ppuDataFill::val#8 ppuDataFill::val#6 Alias ppuDataFill::val#4 = ppuDataFill::val#5 ppuDataFill::ppuDataPut1_val#0 ppuDataFill::ppuDataPut1_val#1 ppuDataFill::val#9 ppuDataFill::val#7 Alias ppuDataFill::i#2 = ppuDataFill::i#5 ppuDataFill::i#4 ppuDataFill::i#3 Alias ppuDataFill::size#10 = ppuDataFill::size#4 ppuDataFill::size#8 ppuDataFill::size#6 -Alias ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#1 ppuDataTransfer::ppuDataPrepare1_ppuData#1 -Alias ppuDataTransfer::cpuData#1 = ppuDataTransfer::cpuData#2 ppuDataTransfer::cpuData#3 -Alias ppuDataTransfer::size#2 = ppuDataTransfer::size#4 ppuDataTransfer::size#6 +Alias ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#2 ppuDataTransfer::ppuDataPrepare1_ppuData#1 +Alias ppuDataTransfer::cpuData#2 = ppuDataTransfer::cpuData#3 ppuDataTransfer::cpuData#4 +Alias ppuDataTransfer::size#3 = ppuDataTransfer::size#5 ppuDataTransfer::size#7 Alias ppuDataTransfer::cpuSrc#2 = ppuDataTransfer::cpuSrc#4 ppuDataTransfer::cpuSrc#5 ppuDataTransfer::cpuSrc#3 Alias ppuDataTransfer::i#2 = ppuDataTransfer::i#5 ppuDataTransfer::i#4 ppuDataTransfer::i#3 -Alias ppuDataTransfer::size#1 = ppuDataTransfer::size#7 ppuDataTransfer::size#5 ppuDataTransfer::size#3 +Alias ppuDataTransfer::size#2 = ppuDataTransfer::size#8 ppuDataTransfer::size#6 ppuDataTransfer::size#4 Alias ppuDataTransfer::ppuDataPut1_val#0 = ppuDataTransfer::ppuDataPut1_val#1 -Alias ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuData#2 ppuDataSet::ppuDataPrepare1_ppuData#1 -Alias ppuDataSet::val#2 = ppuDataSet::val#3 ppuDataSet::val#4 ppuDataSet::ppuDataPut1_val#0 ppuDataSet::ppuDataPut1_val#1 -Alias ppuDataGet::ppuDataPrepare1_ppuData#0 = ppuDataGet::ppuData#1 ppuDataGet::ppuDataPrepare1_ppuData#1 -Alias ppuDataGet::ppuDataRead1_return#0 = ppuDataGet::ppuDataRead1_return#2 ppuDataGet::ppuDataRead1_return#1 ppuDataGet::ppuDataRead1_return#3 ppuDataGet::$1 ppuDataGet::return#0 ppuDataGet::return#3 ppuDataGet::return#1 -Alias gotoxy::x#4 = gotoxy::x#5 +Alias ppuDataFetch::ppuDataPrepare1_ppuData#0 = ppuDataFetch::ppuData#1 ppuDataFetch::ppuDataPrepare1_ppuData#1 +Alias ppuDataFetch::cpuData#1 = ppuDataFetch::cpuData#2 ppuDataFetch::cpuData#3 +Alias ppuDataFetch::size#2 = ppuDataFetch::size#4 ppuDataFetch::size#6 +Alias ppuDataFetch::cpuDst#2 = ppuDataFetch::cpuDst#4 ppuDataFetch::cpuDst#5 ppuDataFetch::cpuDst#3 +Alias ppuDataFetch::i#2 = ppuDataFetch::i#5 ppuDataFetch::i#4 ppuDataFetch::i#3 +Alias ppuDataFetch::size#1 = ppuDataFetch::size#7 ppuDataFetch::size#5 ppuDataFetch::size#3 +Alias ppuDataFetch::ppuDataRead1_return#0 = ppuDataFetch::ppuDataRead1_return#2 ppuDataFetch::ppuDataRead1_return#1 ppuDataFetch::ppuDataRead1_return#3 ppuDataFetch::$2 +Alias ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuData#1 ppuDataSet::ppuDataPrepare1_ppuData#1 +Alias ppuDataSet::val#1 = ppuDataSet::val#2 ppuDataSet::val#3 ppuDataSet::ppuDataPut1_val#0 ppuDataSet::ppuDataPut1_val#1 +Alias gotoxy::x#6 = gotoxy::x#7 Alias gotoxy::line_offset#0 = gotoxy::$4 -Alias gotoxy::y#4 = gotoxy::y#5 -Alias cputc::c#1 = cputc::c#2 -Alias cscroll::line2#6 = cscroll::line2#7 -Alias cscroll::y#2 = cscroll::y#6 -Alias cscroll::line1#6 = cscroll::line1#7 -Alias cscroll::line2#2 = cscroll::line2#4 cscroll::line2#3 cscroll::line2#8 -Alias cscroll::line1#2 = cscroll::line1#4 cscroll::line1#5 cscroll::line1#3 cscroll::line1#8 -Alias cscroll::x#2 = cscroll::x#5 cscroll::x#4 cscroll::x#3 -Alias cscroll::y#3 = cscroll::y#8 cscroll::y#4 cscroll::y#7 cscroll::y#5 -Alias ppuDataGet::return#2 = ppuDataGet::return#4 -Alias cscroll::ch#0 = cscroll::$5 -Alias cscroll::line2#1 = cscroll::line2#5 +Alias gotoxy::y#6 = gotoxy::y#7 +Alias cputc::c#2 = cputc::c#3 +Alias cscroll::line2#2 = cscroll::line2#4 cscroll::line2#5 cscroll::line2#3 +Alias cscroll::line1#2 = cscroll::line1#4 cscroll::line1#5 cscroll::line1#3 +Alias cscroll::y#2 = cscroll::y#5 cscroll::y#4 cscroll::y#3 Alias cputs::c#1 = cputs::c#2 Alias cputs::s#0 = cputs::s#5 cputs::s#4 -Alias ppuDataTransfer::size#0 = main::$1 +Alias cputcxy::c#4 = cputcxy::c#5 +Alias cputsxy::s#1 = cputsxy::s#2 +Alias uctoa::value#10 = uctoa::value#8 uctoa::value#12 uctoa::value#13 uctoa::value#9 uctoa::value#14 uctoa::value#15 uctoa::value#11 +Alias uctoa::buffer#10 = uctoa::buffer#17 uctoa::buffer#21 uctoa::buffer#16 uctoa::buffer#18 uctoa::buffer#13 uctoa::buffer#19 uctoa::buffer#20 uctoa::buffer#6 +Alias uctoa::radix#1 = uctoa::radix#2 uctoa::radix#3 uctoa::radix#4 +Alias uctoa::digit_values#10 = uctoa::digit_values#5 uctoa::digit_values#6 uctoa::digit_values#9 +Alias uctoa::digit#2 = uctoa::digit#3 uctoa::digit#6 uctoa::digit#5 +Alias uctoa::value#2 = uctoa::value#5 uctoa::value#3 uctoa::$10 uctoa::value#4 +Alias uctoa::started#2 = uctoa::started#3 +Alias uctoa::buffer#11 = uctoa::buffer#12 uctoa::buffer#7 uctoa::buffer#8 uctoa::buffer#9 +Alias uctoa::max_digits#10 = uctoa::max_digits#8 uctoa::max_digits#5 uctoa::max_digits#9 +Alias uctoa::digit_value#0 = uctoa::digit_value#1 +Alias uctoa_append::return#0 = uctoa_append::return#3 +Alias uctoa::value#0 = uctoa::$9 +Alias uctoa_append::digit#2 = uctoa_append::digit#4 uctoa_append::digit#3 +Alias uctoa_append::value#2 = uctoa_append::value#3 uctoa_append::value#4 uctoa_append::return#1 uctoa_append::return#4 uctoa_append::return#2 +Alias uctoa_append::sub#1 = uctoa_append::sub#2 +Alias uctoa_append::buffer#1 = uctoa_append::buffer#4 uctoa_append::buffer#2 +Alias ppuDataTransfer::size#1 = main::$1 +Alias main::screensizex1_return#0 = main::screensizex1_return#2 main::screensizex1_return#1 main::screensizex1_return#3 main::$7 +Alias main::x#10 = main::x#6 main::x#8 main::x#2 main::x#3 main::x#9 main::x#7 main::x#4 main::x#5 +Alias main::screensizey1_return#0 = main::screensizey1_return#2 main::screensizey1_return#1 main::screensizey1_return#3 main::$11 +Alias cputcxy::y#1 = main::$12 +Alias main::screensizey2_return#0 = main::screensizey2_return#2 main::screensizey2_return#1 main::screensizey2_return#3 main::$14 +Alias main::y#10 = main::y#6 main::y#8 main::y#2 main::y#3 main::y#9 main::y#7 main::y#4 main::y#5 +Alias main::screensizex2_return#0 = main::screensizex2_return#2 main::screensizex2_return#1 main::screensizex2_return#3 main::$18 +Alias cputcxy::x#3 = main::$19 +Alias main::screensizey3_return#0 = main::screensizey3_return#2 main::screensizey3_return#1 main::screensizey3_return#3 main::$21 +Alias main::i#2 = main::i#6 main::i#7 main::i#3 main::i#4 main::i#5 +Alias uctoa::value#1 = main::$23 Alias readJoy1::return#2 = readJoy1::return#4 Alias vblank::joy#0 = vblank::$0 vblank::joy#4 vblank::joy#5 Alias vblank::joy#1 = vblank::joy#6 vblank::joy#7 Alias vblank::joy#2 = vblank::joy#8 Successful SSA optimization Pass2AliasElimination Alias candidate removed (volatile)conio_line_text = gotoxy::$5 -Alias gotoxy::x#2 = gotoxy::x#4 -Alias gotoxy::y#3 = gotoxy::y#4 +Alias gotoxy::x#4 = gotoxy::x#6 +Alias gotoxy::y#5 = gotoxy::y#6 +Alias uctoa::value#10 = uctoa::value#7 +Alias uctoa::buffer#10 = uctoa::buffer#15 +Alias uctoa::digit#2 = uctoa::digit#4 +Alias uctoa::max_digits#10 = uctoa::max_digits#6 +Alias uctoa::digit_values#10 = uctoa::digit_values#7 Alias vblank::joy#0 = vblank::joy#1 vblank::joy#2 vblank::joy#3 Successful SSA optimization Pass2AliasElimination Alias candidate removed (volatile)conio_line_text = gotoxy::$5 Identical Phi Values (word) ppuDataFill::size#10 (word) ppuDataFill::size#5 Identical Phi Values (byte) ppuDataFill::val#4 (byte) ppuDataFill::val#10 -Identical Phi Values (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 (nomodify void*) ppuDataTransfer::ppuData#0 -Identical Phi Values (nomodify void*) ppuDataTransfer::cpuData#1 (nomodify void*) ppuDataTransfer::cpuData#0 -Identical Phi Values (word) ppuDataTransfer::size#2 (word) ppuDataTransfer::size#0 -Identical Phi Values (word) ppuDataTransfer::size#1 (word) ppuDataTransfer::size#2 -Identical Phi Values (nomodify void*) ppuDataGet::ppuDataPrepare1_ppuData#0 (nomodify void*) ppuDataGet::ppuData#0 -Identical Phi Values (byte) gotoxy::y#2 (byte) gotoxy::y#1 -Identical Phi Values (byte) gotoxy::x#2 (byte) gotoxy::x#1 -Identical Phi Values (byte) cputc::c#1 (byte) cputc::c#0 -Identical Phi Values (byte) cscroll::y#3 (byte) cscroll::y#2 +Identical Phi Values (word) ppuDataTransfer::size#2 (word) ppuDataTransfer::size#3 +Identical Phi Values (nomodify void*) ppuDataFetch::ppuDataPrepare1_ppuData#0 (nomodify void*) ppuDataFetch::ppuData#0 +Identical Phi Values (nomodify void*) ppuDataFetch::cpuData#1 (nomodify void*) ppuDataFetch::cpuData#0 +Identical Phi Values (word) ppuDataFetch::size#2 (word) ppuDataFetch::size#0 +Identical Phi Values (word) ppuDataFetch::size#1 (word) ppuDataFetch::size#2 +Identical Phi Values (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 (nomodify void*) ppuDataSet::ppuData#0 +Identical Phi Values (byte) ppuDataSet::val#1 (byte) ppuDataSet::val#0 Identical Phi Values (to_nomodify byte*) cputs::s#3 (to_nomodify byte*) cputs::s#1 +Identical Phi Values (byte) cputsxy::x#1 (byte) cputsxy::x#0 +Identical Phi Values (byte) cputsxy::y#1 (byte) cputsxy::y#0 +Identical Phi Values (to_nomodify byte*) cputsxy::s#1 (to_nomodify byte*) cputsxy::s#0 +Identical Phi Values (byte) uctoa::radix#1 (byte) uctoa::radix#0 +Identical Phi Values (byte) uctoa::value#10 (byte) uctoa::value#1 +Identical Phi Values (byte*) uctoa::buffer#10 (byte*) uctoa::buffer#5 +Identical Phi Values (byte) uctoa::max_digits#10 (byte) uctoa::max_digits#7 +Identical Phi Values (byte*) uctoa::digit_values#10 (byte*) uctoa::digit_values#8 +Identical Phi Values (byte) uctoa_append::value#5 (byte) uctoa_append::value#0 +Identical Phi Values (byte) uctoa_append::sub#3 (byte) uctoa_append::sub#0 +Identical Phi Values (byte*) uctoa_append::buffer#3 (byte*) uctoa_append::buffer#0 +Identical Phi Values (byte) uctoa_append::sub#1 (byte) uctoa_append::sub#3 +Identical Phi Values (byte*) uctoa_append::buffer#1 (byte*) uctoa_append::buffer#3 Successful SSA optimization Pass2IdenticalPhiElimination Simple Condition (bool~) readJoy1::$0 [10] if((byte) readJoy1::i#2<(byte) 8) goto readJoy1::@2 Simple Condition (bool~) ppuDataFill::$1 [30] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#5) goto ppuDataFill::@2 -Simple Condition (bool~) ppuDataTransfer::$1 [49] if((word) ppuDataTransfer::i#2<(word) ppuDataTransfer::size#0) goto ppuDataTransfer::@2 -Simple Condition (bool~) gotoxy::$1 [97] if((byte) gotoxy::y#1<=(byte) $1e) goto gotoxy::@1 -Simple Condition (bool~) gotoxy::$3 [100] if((byte) gotoxy::x#1<(byte) $20) goto gotoxy::@2 -Simple Condition (bool~) cputc::$0 [113] if((byte) cputc::c#0==(byte) ' +Simple Condition (bool~) ppuDataTransfer::$1 [49] if((word) ppuDataTransfer::i#2<(word) ppuDataTransfer::size#3) goto ppuDataTransfer::@2 +Simple Condition (bool~) ppuDataFetch::$1 [71] if((word) ppuDataFetch::i#2<(word) ppuDataFetch::size#0) goto ppuDataFetch::ppuDataRead1 +Simple Condition (bool~) gotoxy::$1 [106] if((byte) gotoxy::y#4<=(byte) $1e) goto gotoxy::@1 +Simple Condition (bool~) gotoxy::$3 [109] if((byte) gotoxy::x#4<(byte) $20) goto gotoxy::@2 +Simple Condition (bool~) cputc::$0 [122] if((byte) cputc::c#2==(byte) ' ') goto cputc::@1 -Simple Condition (bool~) cputc::$4 [121] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return -Simple Condition (bool~) cscroll::$1 [130] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return -Simple Condition (bool~) cscroll::$8 [132] if((byte) 0!=(byte) conio_scroll_enable) goto cscroll::@3 -Simple Condition (bool~) cscroll::$3 [141] if((byte) cscroll::y#2<(byte)(number) $1e-(number) 1) goto cscroll::@5 -Simple Condition (bool~) cscroll::$4 [151] if((byte) cscroll::x#2<(byte) $20) goto cscroll::@8 -Simple Condition (bool~) cputs::$1 [170] if((byte) 0!=(byte) cputs::c#1) goto cputs::@2 -Simple Condition (bool~) main::initNES1_waitForVBlank1_$1 [190] if((byte) 0==(byte~) main::initNES1_waitForVBlank1_$0) goto main::initNES1_waitForVBlank1_@1 -Simple Condition (bool~) main::initNES1_$5 [203] if((byte) 0!=(byte) main::initNES1_i#1) goto main::initNES1_@1 -Simple Condition (bool~) main::initNES1_waitForVBlank2_$1 [208] if((byte) 0==(byte~) main::initNES1_waitForVBlank2_$0) goto main::initNES1_waitForVBlank2_@1 -Simple Condition (bool~) main::$8 [234] if((number) 0!=(number) 1) goto main::@1 -Simple Condition (bool~) vblank::$2 [243] if((byte) 0==(byte~) vblank::$1) goto vblank::@1 -Simple Condition (bool~) vblank::$4 [246] if((byte) 0==(byte~) vblank::$3) goto vblank::@2 -Simple Condition (bool~) vblank::$10 [249] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 -Simple Condition (bool~) vblank::$6 [253] if((byte) 0==(byte~) vblank::$5) goto vblank::@3 -Simple Condition (bool~) vblank::$12 [256] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 -Simple Condition (bool~) vblank::$8 [260] if((byte) 0==(byte~) vblank::$7) goto vblank::@4 +Simple Condition (bool~) cputc::$4 [130] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return +Simple Condition (bool~) cscroll::$1 [139] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return +Simple Condition (bool~) cscroll::$7 [141] if((byte) 0!=(byte) conio_scroll_enable) goto cscroll::@3 +Simple Condition (bool~) cscroll::$3 [150] if((byte) cscroll::y#2<(byte)(number) $1e-(number) 1) goto cscroll::@5 +Simple Condition (bool~) cputs::$1 [175] if((byte) 0!=(byte) cputs::c#1) goto cputs::@2 +Simple Condition (bool~) uctoa::$0 [197] if((byte) uctoa::radix#0==(const byte) DECIMAL) goto uctoa::@1 +Simple Condition (bool~) uctoa::$1 [201] if((byte) uctoa::radix#0==(const byte) HEXADECIMAL) goto uctoa::@2 +Simple Condition (bool~) uctoa::$2 [205] if((byte) uctoa::radix#0==(const byte) OCTAL) goto uctoa::@3 +Simple Condition (bool~) uctoa::$3 [209] if((byte) uctoa::radix#0==(const byte) BINARY) goto uctoa::@4 +Simple Condition (bool~) uctoa::$5 [226] if((byte) uctoa::digit#2<(byte~) uctoa::$4) goto uctoa::@11 +Simple Condition (bool~) uctoa_append::$0 [249] if((byte) uctoa_append::value#2>=(byte) uctoa_append::sub#0) goto uctoa_append::@2 +Simple Condition (bool~) main::initNES1_waitForVBlank1_$1 [270] if((byte) 0==(byte~) main::initNES1_waitForVBlank1_$0) goto main::initNES1_waitForVBlank1_@1 +Simple Condition (bool~) main::initNES1_$5 [283] if((byte) 0!=(byte) main::initNES1_i#1) goto main::initNES1_@1 +Simple Condition (bool~) main::initNES1_waitForVBlank2_$1 [288] if((byte) 0==(byte~) main::initNES1_waitForVBlank2_$0) goto main::initNES1_waitForVBlank2_@1 +Simple Condition (bool~) main::$9 [308] if((byte) main::x#10<(byte~) main::$8) goto main::@1 +Simple Condition (bool~) main::$16 [324] if((byte) main::y#10<(byte~) main::$15) goto main::@3 +Simple Condition (bool~) main::$22 [339] if((byte) main::i#2<(byte) main::screensizey3_return#0) goto main::@5 +Simple Condition (bool~) main::$26 [358] if((number) 0!=(number) 1) goto main::@7 +Simple Condition (bool~) vblank::$2 [367] if((byte) 0==(byte~) vblank::$1) goto vblank::@1 +Simple Condition (bool~) vblank::$4 [370] if((byte) 0==(byte~) vblank::$3) goto vblank::@2 +Simple Condition (bool~) vblank::$10 [373] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 +Simple Condition (bool~) vblank::$6 [377] if((byte) 0==(byte~) vblank::$5) goto vblank::@3 +Simple Condition (bool~) vblank::$12 [380] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 +Simple Condition (bool~) vblank::$8 [384] if((byte) 0==(byte~) vblank::$7) goto vblank::@4 Successful SSA optimization Pass2ConditionalJumpSimplification +Rewriting ! if()-condition to reversed if() [230] (bool~) uctoa::$8 ← ! (bool~) uctoa::$7 +Rewriting || if()-condition to two if()s [229] (bool~) uctoa::$7 ← (byte) uctoa::started#2 || (bool~) uctoa::$6 +Successful SSA optimization Pass2ConditionalAndOrRewriting +Warning! Adding boolean cast to non-boolean condition (byte) uctoa::started#2 Constant right-side identified [0] (byte*~) readJoy1::$7 ← (byte*)(const struct RICOH_2A03*) APU Constant right-side identified [3] (byte*~) readJoy1::$8 ← (byte*)(const struct RICOH_2A03*) APU Constant right-side identified [12] (byte*~) readJoy1::$9 ← (byte*)(const struct RICOH_2A03*) APU @@ -1552,22 +2396,22 @@ Constant right-side identified [31] (byte*~) ppuDataFill::ppuDataPut1_$1 ← (by Constant right-side identified [38] (byte*~) ppuDataTransfer::ppuDataPrepare1_$4 ← (byte*)(const struct RICOH_2C02*) PPU Constant right-side identified [42] (byte*~) ppuDataTransfer::ppuDataPrepare1_$5 ← (byte*)(const struct RICOH_2C02*) PPU Constant right-side identified [51] (byte*~) ppuDataTransfer::ppuDataPut1_$1 ← (byte*)(const struct RICOH_2C02*) PPU -Constant right-side identified [59] (byte*~) ppuDataSet::ppuDataPrepare1_$4 ← (byte*)(const struct RICOH_2C02*) PPU -Constant right-side identified [63] (byte*~) ppuDataSet::ppuDataPrepare1_$5 ← (byte*)(const struct RICOH_2C02*) PPU -Constant right-side identified [66] (byte*~) ppuDataSet::ppuDataPut1_$1 ← (byte*)(const struct RICOH_2C02*) PPU -Constant right-side identified [72] (byte*~) ppuDataGet::ppuDataPrepare1_$4 ← (byte*)(const struct RICOH_2C02*) PPU -Constant right-side identified [76] (byte*~) ppuDataGet::ppuDataPrepare1_$5 ← (byte*)(const struct RICOH_2C02*) PPU -Constant right-side identified [79] (byte*~) ppuDataGet::ppuDataRead1_$1 ← (byte*)(const struct RICOH_2C02*) PPU -Constant right-side identified [175] (byte*~) main::initNES1_disableVideoOutput1_$2 ← (byte*)(const struct RICOH_2C02*) PPU -Constant right-side identified [178] (byte*~) main::initNES1_disableVideoOutput1_$3 ← (byte*)(const struct RICOH_2C02*) PPU -Constant right-side identified [182] (byte*~) main::initNES1_disableAudioOutput1_$1 ← (byte*)(const struct RICOH_2A03*) APU -Constant right-side identified [186] (byte*~) main::initNES1_waitForVBlank1_$3 ← (byte*)(const struct RICOH_2C02*) PPU -Constant right-side identified [204] (byte*~) main::initNES1_waitForVBlank2_$3 ← (byte*)(const struct RICOH_2C02*) PPU -Constant right-side identified [210] (word) ppuDataTransfer::size#0 ← sizeof (const byte*) PALETTE -Constant right-side identified [227] (byte*~) main::enableVideoOutput1_$2 ← (byte*)(const struct RICOH_2C02*) PPU -Constant right-side identified [230] (byte*~) main::enableVideoOutput1_$3 ← (byte*)(const struct RICOH_2C02*) PPU -Constant right-side identified [262] (byte*~) vblank::$15 ← (byte*)(const struct RICOH_2C02*) PPU -Constant right-side identified [265] (byte*~) vblank::$16 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [59] (byte*~) ppuDataFetch::ppuDataPrepare1_$4 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [63] (byte*~) ppuDataFetch::ppuDataPrepare1_$5 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [72] (byte*~) ppuDataFetch::ppuDataRead1_$1 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [81] (byte*~) ppuDataSet::ppuDataPrepare1_$4 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [85] (byte*~) ppuDataSet::ppuDataPrepare1_$5 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [88] (byte*~) ppuDataSet::ppuDataPut1_$1 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [255] (byte*~) main::initNES1_disableVideoOutput1_$2 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [258] (byte*~) main::initNES1_disableVideoOutput1_$3 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [262] (byte*~) main::initNES1_disableAudioOutput1_$1 ← (byte*)(const struct RICOH_2A03*) APU +Constant right-side identified [266] (byte*~) main::initNES1_waitForVBlank1_$3 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [284] (byte*~) main::initNES1_waitForVBlank2_$3 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [290] (word) ppuDataTransfer::size#1 ← sizeof (const byte*) PALETTE +Constant right-side identified [351] (byte*~) main::enableVideoOutput1_$2 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [354] (byte*~) main::enableVideoOutput1_$3 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [386] (byte*~) vblank::$15 ← (byte*)(const struct RICOH_2C02*) PPU +Constant right-side identified [389] (byte*~) vblank::$16 ← (byte*)(const struct RICOH_2C02*) PPU Successful SSA optimization Pass2ConstantRValueConsolidation Constant (const byte*) readJoy1::$7 = (byte*)APU Constant (const byte*) readJoy1::$8 = (byte*)APU @@ -1582,12 +2426,13 @@ Constant (const byte*) ppuDataTransfer::ppuDataPrepare1_$4 = (byte*)PPU Constant (const byte*) ppuDataTransfer::ppuDataPrepare1_$5 = (byte*)PPU Constant (const word) ppuDataTransfer::i#0 = 0 Constant (const byte*) ppuDataTransfer::ppuDataPut1_$1 = (byte*)PPU +Constant (const byte*) ppuDataFetch::ppuDataPrepare1_$4 = (byte*)PPU +Constant (const byte*) ppuDataFetch::ppuDataPrepare1_$5 = (byte*)PPU +Constant (const word) ppuDataFetch::i#0 = 0 +Constant (const byte*) ppuDataFetch::ppuDataRead1_$1 = (byte*)PPU Constant (const byte*) ppuDataSet::ppuDataPrepare1_$4 = (byte*)PPU Constant (const byte*) ppuDataSet::ppuDataPrepare1_$5 = (byte*)PPU Constant (const byte*) ppuDataSet::ppuDataPut1_$1 = (byte*)PPU -Constant (const byte*) ppuDataGet::ppuDataPrepare1_$4 = (byte*)PPU -Constant (const byte*) ppuDataGet::ppuDataPrepare1_$5 = (byte*)PPU -Constant (const byte*) ppuDataGet::ppuDataRead1_$1 = (byte*)PPU Constant (const nomodify void*) ppuDataFill::ppuData#0 = (void*)CONIO_SCREEN_TEXT Constant (const byte) ppuDataFill::val#0 = ' ' Constant (const word) ppuDataFill::size#0 = $3c0 @@ -1598,40 +2443,77 @@ Constant (const byte*) cscroll::line2#0 = CONIO_SCREEN_TEXT+$20 Constant (const byte) cscroll::y#0 = 0 Constant (const byte) gotoxy::x#1 = 0 Constant (const byte) gotoxy::y#1 = 0 -Constant (const byte) cscroll::x#0 = 0 +Constant (const nomodify void*) ppuDataFetch::cpuData#0 = (void*)scroll_buffer +Constant (const word) ppuDataFetch::size#0 = $20 +Constant (const nomodify void*) ppuDataTransfer::cpuData#0 = (void*)scroll_buffer +Constant (const word) ppuDataTransfer::size#0 = $20 Constant (const nomodify void*) ppuDataFill::ppuData#1 = (void*)CONIO_SCREEN_TEXT+(word)$1e*$20-$20 Constant (const byte) ppuDataFill::val#1 = ' ' Constant (const word) ppuDataFill::size#1 = $20 Constant (const byte) cputs::c#0 = 0 +Constant (const byte) uctoa::max_digits#0 = 0 +Constant (const byte*) uctoa::digit_values#0 = (byte*) 0 +Constant (const byte) uctoa::max_digits#1 = 3 +Constant (const byte*) uctoa::digit_values#1 = RADIX_DECIMAL_VALUES_CHAR +Constant (const byte) uctoa::max_digits#2 = 2 +Constant (const byte*) uctoa::digit_values#2 = RADIX_HEXADECIMAL_VALUES_CHAR +Constant (const byte) uctoa::max_digits#3 = 3 +Constant (const byte*) uctoa::digit_values#3 = RADIX_OCTAL_VALUES_CHAR +Constant (const byte) uctoa::max_digits#4 = 8 +Constant (const byte*) uctoa::digit_values#4 = RADIX_BINARY_VALUES_CHAR +Constant (const byte) uctoa::started#0 = 0 +Constant (const byte) uctoa::digit#0 = 0 +Constant (const byte) uctoa::started#1 = 1 +Constant (const byte) uctoa_append::digit#0 = 0 Constant (const byte*) main::initNES1_disableVideoOutput1_$2 = (byte*)PPU Constant (const byte*) main::initNES1_disableVideoOutput1_$3 = (byte*)PPU Constant (const byte*) main::initNES1_disableAudioOutput1_$1 = (byte*)APU Constant (const byte*) main::initNES1_waitForVBlank1_$3 = (byte*)PPU Constant (const byte) main::initNES1_i#0 = 0 Constant (const byte*) main::initNES1_waitForVBlank2_$3 = (byte*)PPU -Constant (const word) ppuDataTransfer::size#0 = sizeof PALETTE -Constant (const nomodify void*) ppuDataTransfer::ppuData#0 = (void*)PPU_PALETTE -Constant (const nomodify void*) ppuDataTransfer::cpuData#0 = (void*)PALETTE +Constant (const word) ppuDataTransfer::size#1 = sizeof PALETTE +Constant (const nomodify void*) ppuDataTransfer::ppuData#1 = (void*)PPU_PALETTE +Constant (const nomodify void*) ppuDataTransfer::cpuData#1 = (void*)PALETTE Constant (const nomodify void*) ppuDataFill::ppuData#2 = (void*)PPU_ATTRIBUTE_TABLE_0 Constant (const byte) ppuDataFill::val#2 = 0 Constant (const word) ppuDataFill::size#2 = $40 Constant (const nomodify void*) ppuDataFill::ppuData#3 = (void*)PPU_ATTRIBUTE_TABLE_1 Constant (const byte) ppuDataFill::val#3 = 0 Constant (const word) ppuDataFill::size#3 = $40 -Constant (const to_nomodify byte*) cputs::s#1 = main::s +Constant (const byte) main::x#0 = 1 +Constant (const byte) main::screensizex1_return#0 = $20 +Constant (const byte) cputcxy::y#0 = 1 +Constant (const byte) cputcxy::c#0 = '-' +Constant (const byte) main::screensizey1_return#0 = $1e +Constant (const byte) cputcxy::c#1 = '-' +Constant (const byte) main::y#0 = 1 +Constant (const byte) main::screensizey2_return#0 = $1e +Constant (const byte) cputcxy::x#2 = 1 +Constant (const byte) cputcxy::c#2 = 'i' +Constant (const byte) main::screensizex2_return#0 = $20 +Constant (const byte) cputcxy::c#3 = 'i' +Constant (const byte) main::i#0 = 0 +Constant (const byte) main::screensizey3_return#0 = $1e +Constant (const byte*) uctoa::buffer#5 = num_buffer +Constant (const byte) uctoa::radix#0 = HEXADECIMAL +Constant (const to_nomodify byte*) cputsxy::s#0 = num_buffer Constant (const byte*) main::enableVideoOutput1_$2 = (byte*)PPU Constant (const byte*) main::enableVideoOutput1_$3 = (byte*)PPU Constant (const byte*) vblank::$15 = (byte*)PPU Constant (const byte*) vblank::$16 = (byte*)PPU Constant (const byte) conio_scroll_enable = 1 Successful SSA optimization Pass2ConstantIdentification -Constant (const byte*) ppuDataTransfer::cpuSrc#0 = (byte*)ppuDataTransfer::cpuData#0 +Constant (const byte*) ppuDataFetch::cpuDst#0 = (byte*)ppuDataFetch::cpuData#0 +Constant (const to_nomodify byte*) cputs::s#1 = cputsxy::s#0 Successful SSA optimization Pass2ConstantIdentification -if() condition always true - replacing block destination [97] if((const byte) gotoxy::y#1<=(byte) $1e) goto gotoxy::@1 -if() condition always true - replacing block destination [100] if((const byte) gotoxy::x#1<(byte) $20) goto gotoxy::@2 -if() condition always true - replacing block destination [132] if((byte) 0!=(const byte) conio_scroll_enable) goto cscroll::@3 -if() condition always true - replacing block destination [234] if((number) 0!=(number) 1) goto main::@1 +if() condition always true - replacing block destination [141] if((byte) 0!=(const byte) conio_scroll_enable) goto cscroll::@3 +if() condition always false - eliminating [197] if((const byte) uctoa::radix#0==(const byte) DECIMAL) goto uctoa::@1 +if() condition always true - replacing block destination [201] if((const byte) uctoa::radix#0==(const byte) HEXADECIMAL) goto uctoa::@2 +if() condition always false - eliminating [205] if((const byte) uctoa::radix#0==(const byte) OCTAL) goto uctoa::@3 +if() condition always false - eliminating [209] if((const byte) uctoa::radix#0==(const byte) BINARY) goto uctoa::@4 +if() condition always true - replacing block destination [358] if((number) 0!=(number) 1) goto main::@7 Successful SSA optimization Pass2ConstantIfs +Rewriting conditional comparison [106] if((byte) gotoxy::y#4<=(byte) $1e) goto gotoxy::@1 Converting *(pointer+n) to pointer[n] [2] *((byte*~) readJoy1::$4) ← (byte) 1 -- *(readJoy1::$7 + OFFSET_STRUCT_RICOH_2A03_JOY1) Converting *(pointer+n) to pointer[n] [5] *((byte*~) readJoy1::$5) ← (byte) 0 -- *(readJoy1::$8 + OFFSET_STRUCT_RICOH_2A03_JOY1) Converting *(pointer+n) to pointer[n] [14] (byte~) readJoy1::$2 ← *((byte*~) readJoy1::$6) & (byte) 1 -- *(readJoy1::$9 + OFFSET_STRUCT_RICOH_2A03_JOY1) @@ -1641,27 +2523,27 @@ Converting *(pointer+n) to pointer[n] [33] *((byte*~) ppuDataFill::ppuDataPut1_$ Converting *(pointer+n) to pointer[n] [40] *((byte*~) ppuDataTransfer::ppuDataPrepare1_$2) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$0 -- *(ppuDataTransfer::ppuDataPrepare1_$4 + OFFSET_STRUCT_RICOH_2C02_PPUADDR) Converting *(pointer+n) to pointer[n] [44] *((byte*~) ppuDataTransfer::ppuDataPrepare1_$3) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$1 -- *(ppuDataTransfer::ppuDataPrepare1_$5 + OFFSET_STRUCT_RICOH_2C02_PPUADDR) Converting *(pointer+n) to pointer[n] [53] *((byte*~) ppuDataTransfer::ppuDataPut1_$0) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 -- *(ppuDataTransfer::ppuDataPut1_$1 + OFFSET_STRUCT_RICOH_2C02_PPUDATA) -Converting *(pointer+n) to pointer[n] [61] *((byte*~) ppuDataSet::ppuDataPrepare1_$2) ← (byte~) ppuDataSet::ppuDataPrepare1_$0 -- *(ppuDataSet::ppuDataPrepare1_$4 + OFFSET_STRUCT_RICOH_2C02_PPUADDR) -Converting *(pointer+n) to pointer[n] [65] *((byte*~) ppuDataSet::ppuDataPrepare1_$3) ← (byte~) ppuDataSet::ppuDataPrepare1_$1 -- *(ppuDataSet::ppuDataPrepare1_$5 + OFFSET_STRUCT_RICOH_2C02_PPUADDR) -Converting *(pointer+n) to pointer[n] [68] *((byte*~) ppuDataSet::ppuDataPut1_$0) ← (byte) ppuDataSet::val#2 -- *(ppuDataSet::ppuDataPut1_$1 + OFFSET_STRUCT_RICOH_2C02_PPUDATA) -Converting *(pointer+n) to pointer[n] [74] *((byte*~) ppuDataGet::ppuDataPrepare1_$2) ← (byte~) ppuDataGet::ppuDataPrepare1_$0 -- *(ppuDataGet::ppuDataPrepare1_$4 + OFFSET_STRUCT_RICOH_2C02_PPUADDR) -Converting *(pointer+n) to pointer[n] [78] *((byte*~) ppuDataGet::ppuDataPrepare1_$3) ← (byte~) ppuDataGet::ppuDataPrepare1_$1 -- *(ppuDataGet::ppuDataPrepare1_$5 + OFFSET_STRUCT_RICOH_2C02_PPUADDR) -Converting *(pointer+n) to pointer[n] [81] (byte) ppuDataGet::ppuDataRead1_return#0 ← *((byte*~) ppuDataGet::ppuDataRead1_$0) -- *(ppuDataGet::ppuDataRead1_$1 + OFFSET_STRUCT_RICOH_2C02_PPUDATA) -Converting *(pointer+n) to pointer[n] [177] *((byte*~) main::initNES1_disableVideoOutput1_$0) ← (byte) 0 -- *(main::initNES1_disableVideoOutput1_$2 + OFFSET_STRUCT_RICOH_2C02_PPUCTRL) -Converting *(pointer+n) to pointer[n] [180] *((byte*~) main::initNES1_disableVideoOutput1_$1) ← (byte) 0 -- *(main::initNES1_disableVideoOutput1_$3 + OFFSET_STRUCT_RICOH_2C02_PPUMASK) -Converting *(pointer+n) to pointer[n] [184] *((byte*~) main::initNES1_disableAudioOutput1_$0) ← (byte) $40 -- *(main::initNES1_disableAudioOutput1_$1 + OFFSET_STRUCT_RICOH_2A03_DMC_FREQ) -Converting *(pointer+n) to pointer[n] [188] (byte~) main::initNES1_waitForVBlank1_$0 ← *((byte*~) main::initNES1_waitForVBlank1_$2) & (byte) $80 -- *(main::initNES1_waitForVBlank1_$3 + OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) -Converting *(pointer+n) to pointer[n] [206] (byte~) main::initNES1_waitForVBlank2_$0 ← *((byte*~) main::initNES1_waitForVBlank2_$2) & (byte) $80 -- *(main::initNES1_waitForVBlank2_$3 + OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) -Converting *(pointer+n) to pointer[n] [229] *((byte*~) main::enableVideoOutput1_$0) ← (byte) $80 -- *(main::enableVideoOutput1_$2 + OFFSET_STRUCT_RICOH_2C02_PPUCTRL) -Converting *(pointer+n) to pointer[n] [232] *((byte*~) main::enableVideoOutput1_$1) ← (byte) $1e -- *(main::enableVideoOutput1_$3 + OFFSET_STRUCT_RICOH_2C02_PPUMASK) -Converting *(pointer+n) to pointer[n] [264] *((byte*~) vblank::$13) ← (volatile byte) x_scroll -- *(vblank::$15 + OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) -Converting *(pointer+n) to pointer[n] [267] *((byte*~) vblank::$14) ← (volatile byte) y_scroll -- *(vblank::$16 + OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) +Converting *(pointer+n) to pointer[n] [61] *((byte*~) ppuDataFetch::ppuDataPrepare1_$2) ← (byte~) ppuDataFetch::ppuDataPrepare1_$0 -- *(ppuDataFetch::ppuDataPrepare1_$4 + OFFSET_STRUCT_RICOH_2C02_PPUADDR) +Converting *(pointer+n) to pointer[n] [65] *((byte*~) ppuDataFetch::ppuDataPrepare1_$3) ← (byte~) ppuDataFetch::ppuDataPrepare1_$1 -- *(ppuDataFetch::ppuDataPrepare1_$5 + OFFSET_STRUCT_RICOH_2C02_PPUADDR) +Converting *(pointer+n) to pointer[n] [74] (byte) ppuDataFetch::ppuDataRead1_return#0 ← *((byte*~) ppuDataFetch::ppuDataRead1_$0) -- *(ppuDataFetch::ppuDataRead1_$1 + OFFSET_STRUCT_RICOH_2C02_PPUDATA) +Converting *(pointer+n) to pointer[n] [83] *((byte*~) ppuDataSet::ppuDataPrepare1_$2) ← (byte~) ppuDataSet::ppuDataPrepare1_$0 -- *(ppuDataSet::ppuDataPrepare1_$4 + OFFSET_STRUCT_RICOH_2C02_PPUADDR) +Converting *(pointer+n) to pointer[n] [87] *((byte*~) ppuDataSet::ppuDataPrepare1_$3) ← (byte~) ppuDataSet::ppuDataPrepare1_$1 -- *(ppuDataSet::ppuDataPrepare1_$5 + OFFSET_STRUCT_RICOH_2C02_PPUADDR) +Converting *(pointer+n) to pointer[n] [90] *((byte*~) ppuDataSet::ppuDataPut1_$0) ← (byte) ppuDataSet::val#0 -- *(ppuDataSet::ppuDataPut1_$1 + OFFSET_STRUCT_RICOH_2C02_PPUDATA) +Converting *(pointer+n) to pointer[n] [257] *((byte*~) main::initNES1_disableVideoOutput1_$0) ← (byte) 0 -- *(main::initNES1_disableVideoOutput1_$2 + OFFSET_STRUCT_RICOH_2C02_PPUCTRL) +Converting *(pointer+n) to pointer[n] [260] *((byte*~) main::initNES1_disableVideoOutput1_$1) ← (byte) 0 -- *(main::initNES1_disableVideoOutput1_$3 + OFFSET_STRUCT_RICOH_2C02_PPUMASK) +Converting *(pointer+n) to pointer[n] [264] *((byte*~) main::initNES1_disableAudioOutput1_$0) ← (byte) $40 -- *(main::initNES1_disableAudioOutput1_$1 + OFFSET_STRUCT_RICOH_2A03_DMC_FREQ) +Converting *(pointer+n) to pointer[n] [268] (byte~) main::initNES1_waitForVBlank1_$0 ← *((byte*~) main::initNES1_waitForVBlank1_$2) & (byte) $80 -- *(main::initNES1_waitForVBlank1_$3 + OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) +Converting *(pointer+n) to pointer[n] [286] (byte~) main::initNES1_waitForVBlank2_$0 ← *((byte*~) main::initNES1_waitForVBlank2_$2) & (byte) $80 -- *(main::initNES1_waitForVBlank2_$3 + OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) +Converting *(pointer+n) to pointer[n] [353] *((byte*~) main::enableVideoOutput1_$0) ← (byte) $80 -- *(main::enableVideoOutput1_$2 + OFFSET_STRUCT_RICOH_2C02_PPUCTRL) +Converting *(pointer+n) to pointer[n] [356] *((byte*~) main::enableVideoOutput1_$1) ← (byte) $1e -- *(main::enableVideoOutput1_$3 + OFFSET_STRUCT_RICOH_2C02_PPUMASK) +Converting *(pointer+n) to pointer[n] [388] *((byte*~) vblank::$13) ← (volatile byte) x_scroll -- *(vblank::$15 + OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) +Converting *(pointer+n) to pointer[n] [391] *((byte*~) vblank::$14) ← (volatile byte) y_scroll -- *(vblank::$16 + OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) Successful SSA optimization Pass2InlineDerefIdx -Simplifying expression containing zero main::initNES1_disableVideoOutput1_$2 in [176] (byte*~) main::initNES1_disableVideoOutput1_$0 ← (const byte*) main::initNES1_disableVideoOutput1_$2 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL -Simplifying expression containing zero main::initNES1_disableVideoOutput1_$2 in [177] *((const byte*) main::initNES1_disableVideoOutput1_$2 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL) ← (byte) 0 -Simplifying expression containing zero MEMORY in [193] *((const nomodify byte*) MEMORY+(byte) 0 + (byte) main::initNES1_i#2) ← (byte) 0 -Simplifying expression containing zero main::enableVideoOutput1_$2 in [228] (byte*~) main::enableVideoOutput1_$0 ← (const byte*) main::enableVideoOutput1_$2 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL -Simplifying expression containing zero main::enableVideoOutput1_$2 in [229] *((const byte*) main::enableVideoOutput1_$2 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL) ← (byte) $80 +Simplifying expression containing zero main::initNES1_disableVideoOutput1_$2 in [256] (byte*~) main::initNES1_disableVideoOutput1_$0 ← (const byte*) main::initNES1_disableVideoOutput1_$2 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL +Simplifying expression containing zero main::initNES1_disableVideoOutput1_$2 in [257] *((const byte*) main::initNES1_disableVideoOutput1_$2 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL) ← (byte) 0 +Simplifying expression containing zero MEMORY in [273] *((const nomodify byte*) MEMORY+(byte) 0 + (byte) main::initNES1_i#2) ← (byte) 0 +Simplifying expression containing zero main::enableVideoOutput1_$2 in [352] (byte*~) main::enableVideoOutput1_$0 ← (const byte*) main::enableVideoOutput1_$2 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL +Simplifying expression containing zero main::enableVideoOutput1_$2 in [353] *((const byte*) main::enableVideoOutput1_$2 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL) ← (byte) $80 Successful SSA optimization PassNSimplifyExpressionWithZero Eliminating unused variable (byte*~) readJoy1::$4 and assignment [0] (byte*~) readJoy1::$4 ← (const byte*) readJoy1::$7 + (const byte) OFFSET_STRUCT_RICOH_2A03_JOY1 Eliminating unused variable (byte*~) readJoy1::$5 and assignment [2] (byte*~) readJoy1::$5 ← (const byte*) readJoy1::$8 + (const byte) OFFSET_STRUCT_RICOH_2A03_JOY1 @@ -1669,64 +2551,116 @@ Eliminating unused variable (byte*~) readJoy1::$6 and assignment [7] (byte*~) re Eliminating unused variable (byte*~) ppuDataFill::ppuDataPrepare1_$2 and assignment [14] (byte*~) ppuDataFill::ppuDataPrepare1_$2 ← (const byte*) ppuDataFill::ppuDataPrepare1_$4 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR Eliminating unused variable (byte*~) ppuDataFill::ppuDataPrepare1_$3 and assignment [17] (byte*~) ppuDataFill::ppuDataPrepare1_$3 ← (const byte*) ppuDataFill::ppuDataPrepare1_$5 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR Eliminating unused variable (byte*~) ppuDataFill::ppuDataPut1_$0 and assignment [21] (byte*~) ppuDataFill::ppuDataPut1_$0 ← (const byte*) ppuDataFill::ppuDataPut1_$1 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA -Eliminating unused variable (byte*~) ppuDataTransfer::ppuDataPrepare1_$2 and assignment [26] (byte*~) ppuDataTransfer::ppuDataPrepare1_$2 ← (const byte*) ppuDataTransfer::ppuDataPrepare1_$4 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR -Eliminating unused variable (byte*~) ppuDataTransfer::ppuDataPrepare1_$3 and assignment [29] (byte*~) ppuDataTransfer::ppuDataPrepare1_$3 ← (const byte*) ppuDataTransfer::ppuDataPrepare1_$5 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR -Eliminating unused variable (byte*~) ppuDataTransfer::ppuDataPut1_$0 and assignment [34] (byte*~) ppuDataTransfer::ppuDataPut1_$0 ← (const byte*) ppuDataTransfer::ppuDataPut1_$1 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA -Eliminating unused variable (byte*~) ppuDataSet::ppuDataPrepare1_$2 and assignment [41] (byte*~) ppuDataSet::ppuDataPrepare1_$2 ← (const byte*) ppuDataSet::ppuDataPrepare1_$4 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR -Eliminating unused variable (byte*~) ppuDataSet::ppuDataPrepare1_$3 and assignment [44] (byte*~) ppuDataSet::ppuDataPrepare1_$3 ← (const byte*) ppuDataSet::ppuDataPrepare1_$5 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR -Eliminating unused variable (byte*~) ppuDataSet::ppuDataPut1_$0 and assignment [46] (byte*~) ppuDataSet::ppuDataPut1_$0 ← (const byte*) ppuDataSet::ppuDataPut1_$1 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA -Eliminating unused variable (byte*~) ppuDataGet::ppuDataPrepare1_$2 and assignment [50] (byte*~) ppuDataGet::ppuDataPrepare1_$2 ← (const byte*) ppuDataGet::ppuDataPrepare1_$4 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR -Eliminating unused variable (byte*~) ppuDataGet::ppuDataPrepare1_$3 and assignment [53] (byte*~) ppuDataGet::ppuDataPrepare1_$3 ← (const byte*) ppuDataGet::ppuDataPrepare1_$5 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR -Eliminating unused variable (byte*~) ppuDataGet::ppuDataRead1_$0 and assignment [55] (byte*~) ppuDataGet::ppuDataRead1_$0 ← (const byte*) ppuDataGet::ppuDataRead1_$1 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA -Eliminating unused variable (byte*~) main::initNES1_disableVideoOutput1_$0 and assignment [119] (byte*~) main::initNES1_disableVideoOutput1_$0 ← (const byte*) main::initNES1_disableVideoOutput1_$2 -Eliminating unused variable (byte*~) main::initNES1_disableVideoOutput1_$1 and assignment [121] (byte*~) main::initNES1_disableVideoOutput1_$1 ← (const byte*) main::initNES1_disableVideoOutput1_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK -Eliminating unused variable (byte*~) main::initNES1_disableAudioOutput1_$0 and assignment [124] (byte*~) main::initNES1_disableAudioOutput1_$0 ← (const byte*) main::initNES1_disableAudioOutput1_$1 + (const byte) OFFSET_STRUCT_RICOH_2A03_DMC_FREQ -Eliminating unused variable (byte*~) main::initNES1_waitForVBlank1_$2 and assignment [127] (byte*~) main::initNES1_waitForVBlank1_$2 ← (const byte*) main::initNES1_waitForVBlank1_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS -Eliminating unused variable (byte*~) main::initNES1_waitForVBlank2_$2 and assignment [141] (byte*~) main::initNES1_waitForVBlank2_$2 ← (const byte*) main::initNES1_waitForVBlank2_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS -Eliminating unused variable (byte*~) main::enableVideoOutput1_$0 and assignment [152] (byte*~) main::enableVideoOutput1_$0 ← (const byte*) main::enableVideoOutput1_$2 -Eliminating unused variable (byte*~) main::enableVideoOutput1_$1 and assignment [154] (byte*~) main::enableVideoOutput1_$1 ← (const byte*) main::enableVideoOutput1_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK -Eliminating unused variable (byte*~) vblank::$13 and assignment [177] (byte*~) vblank::$13 ← (const byte*) vblank::$15 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL -Eliminating unused variable (byte*~) vblank::$14 and assignment [179] (byte*~) vblank::$14 ← (const byte*) vblank::$16 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL +Eliminating unused variable (byte*~) ppuDataTransfer::ppuDataPrepare1_$2 and assignment [27] (byte*~) ppuDataTransfer::ppuDataPrepare1_$2 ← (const byte*) ppuDataTransfer::ppuDataPrepare1_$4 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR +Eliminating unused variable (byte*~) ppuDataTransfer::ppuDataPrepare1_$3 and assignment [30] (byte*~) ppuDataTransfer::ppuDataPrepare1_$3 ← (const byte*) ppuDataTransfer::ppuDataPrepare1_$5 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR +Eliminating unused variable (byte*~) ppuDataTransfer::ppuDataPut1_$0 and assignment [36] (byte*~) ppuDataTransfer::ppuDataPut1_$0 ← (const byte*) ppuDataTransfer::ppuDataPut1_$1 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA +Eliminating unused variable (byte*~) ppuDataFetch::ppuDataPrepare1_$2 and assignment [42] (byte*~) ppuDataFetch::ppuDataPrepare1_$2 ← (const byte*) ppuDataFetch::ppuDataPrepare1_$4 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR +Eliminating unused variable (byte*~) ppuDataFetch::ppuDataPrepare1_$3 and assignment [45] (byte*~) ppuDataFetch::ppuDataPrepare1_$3 ← (const byte*) ppuDataFetch::ppuDataPrepare1_$5 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR +Eliminating unused variable (byte*~) ppuDataFetch::ppuDataRead1_$0 and assignment [50] (byte*~) ppuDataFetch::ppuDataRead1_$0 ← (const byte*) ppuDataFetch::ppuDataRead1_$1 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA +Eliminating unused variable (byte*~) ppuDataSet::ppuDataPrepare1_$2 and assignment [57] (byte*~) ppuDataSet::ppuDataPrepare1_$2 ← (const byte*) ppuDataSet::ppuDataPrepare1_$4 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR +Eliminating unused variable (byte*~) ppuDataSet::ppuDataPrepare1_$3 and assignment [60] (byte*~) ppuDataSet::ppuDataPrepare1_$3 ← (const byte*) ppuDataSet::ppuDataPrepare1_$5 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR +Eliminating unused variable (byte*~) ppuDataSet::ppuDataPut1_$0 and assignment [62] (byte*~) ppuDataSet::ppuDataPut1_$0 ← (const byte*) ppuDataSet::ppuDataPut1_$1 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA +Eliminating unused variable (byte*~) main::initNES1_disableVideoOutput1_$0 and assignment [170] (byte*~) main::initNES1_disableVideoOutput1_$0 ← (const byte*) main::initNES1_disableVideoOutput1_$2 +Eliminating unused variable (byte*~) main::initNES1_disableVideoOutput1_$1 and assignment [172] (byte*~) main::initNES1_disableVideoOutput1_$1 ← (const byte*) main::initNES1_disableVideoOutput1_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK +Eliminating unused variable (byte*~) main::initNES1_disableAudioOutput1_$0 and assignment [175] (byte*~) main::initNES1_disableAudioOutput1_$0 ← (const byte*) main::initNES1_disableAudioOutput1_$1 + (const byte) OFFSET_STRUCT_RICOH_2A03_DMC_FREQ +Eliminating unused variable (byte*~) main::initNES1_waitForVBlank1_$2 and assignment [178] (byte*~) main::initNES1_waitForVBlank1_$2 ← (const byte*) main::initNES1_waitForVBlank1_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS +Eliminating unused variable (byte*~) main::initNES1_waitForVBlank2_$2 and assignment [192] (byte*~) main::initNES1_waitForVBlank2_$2 ← (const byte*) main::initNES1_waitForVBlank2_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS +Eliminating unused variable (byte*~) main::enableVideoOutput1_$0 and assignment [228] (byte*~) main::enableVideoOutput1_$0 ← (const byte*) main::enableVideoOutput1_$2 +Eliminating unused variable (byte*~) main::enableVideoOutput1_$1 and assignment [230] (byte*~) main::enableVideoOutput1_$1 ← (const byte*) main::enableVideoOutput1_$3 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK +Eliminating unused variable (byte*~) vblank::$13 and assignment [253] (byte*~) vblank::$13 ← (const byte*) vblank::$15 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL +Eliminating unused variable (byte*~) vblank::$14 and assignment [255] (byte*~) vblank::$14 ← (const byte*) vblank::$16 + (const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL Eliminating unused constant (const byte) cputs::c#0 +Eliminating unused constant (const byte) BINARY +Eliminating unused constant (const byte) OCTAL +Eliminating unused constant (const byte) DECIMAL +Eliminating unused constant (const byte) uctoa::max_digits#0 +Eliminating unused constant (const byte*) uctoa::digit_values#0 +Eliminating unused constant (const byte) uctoa::radix#0 Eliminating unused constant (const byte) OFFSET_STRUCT_RICOH_2C02_PPUCTRL Eliminating unused constant (const byte) conio_scroll_enable Successful SSA optimization PassNEliminateUnusedVars -Eliminating variable (byte) gotoxy::y#3 from unused block gotoxy::@1 -Eliminating variable (byte) gotoxy::x#3 from unused block gotoxy::@2 -Eliminating variable (word~) gotoxy::$6 from unused block gotoxy::@2 -Eliminating variable (word) gotoxy::line_offset#0 from unused block gotoxy::@2 -Eliminating variable (byte*~) gotoxy::$5 from unused block gotoxy::@2 -Removing unused procedure gotoxy -Removing unused procedure block gotoxy -Removing PHI-reference to removed block (gotoxy) in block gotoxy::@1 -Removing unused procedure block gotoxy::@1 -Removing PHI-reference to removed block (gotoxy::@1) in block gotoxy::@2 -Removing unused procedure block gotoxy::@3 -Removing unused procedure block gotoxy::@2 -Removing unused procedure block gotoxy::@4 -Removing unused procedure block gotoxy::@return +Eliminating unused constant (const byte) HEXADECIMAL +Successful SSA optimization PassNEliminateUnusedVars +Eliminating variable (byte*) uctoa::buffer#0 from unused block uctoa::@9 +Eliminating variable (byte*) uctoa::buffer#1 from unused block uctoa::@9 +Eliminating variable (byte*) uctoa::buffer#2 from unused block uctoa::@9 +Removing PHI-reference to removed block (cscroll::@2) in block gotoxy +Removing PHI-reference to removed block (cscroll::@2) in block gotoxy Removing unused block cscroll::@2 -Removing unused block cscroll::@10 +Removing unused block cscroll::@7 +Removing PHI-reference to removed block (uctoa::@1) in block uctoa::@5 +Removing PHI-reference to removed block (uctoa::@1) in block uctoa::@5 +Removing unused block uctoa::@1 +Removing unused block uctoa::@7 +Removing PHI-reference to removed block (uctoa::@3) in block uctoa::@5 +Removing PHI-reference to removed block (uctoa::@3) in block uctoa::@5 +Removing unused block uctoa::@3 +Removing unused block uctoa::@8 +Removing PHI-reference to removed block (uctoa::@4) in block uctoa::@5 +Removing PHI-reference to removed block (uctoa::@4) in block uctoa::@5 +Removing unused block uctoa::@4 +Removing unused block uctoa::@9 Removing unused block main::@return Successful SSA optimization Pass2EliminateUnusedBlocks +Adding number conversion cast (unumber) $1e+1 in if((byte) gotoxy::y#4<(byte) $1e+(number) 1) goto gotoxy::@1 +Adding number conversion cast (unumber) 1 in if((byte) gotoxy::y#4<(unumber)(byte) $1e+(number) 1) goto gotoxy::@1 +Adding number conversion cast (unumber) 0 in (bool~) uctoa::$11 ← (number) 0 != (byte) uctoa::started#2 +Successful SSA optimization PassNAddNumberTypeConversions +Simplifying constant integer cast (byte) $1e+(unumber)(number) 1 +Simplifying constant integer cast 1 +Simplifying constant integer cast 0 +Successful SSA optimization PassNCastSimplification +Finalized unsigned number type (byte) 1 +Finalized unsigned number type (byte) 0 +Successful SSA optimization PassNFinalizeNumberTypeConversions Resolving array sizeof() sizeof (const byte*) PALETTE Successful SSA optimization PassNSizeOfSimplification -Constant right-side identified [19] (byte~) ppuDataTransfer::ppuDataPrepare1_$0 ← > (const nomodify void*) ppuDataTransfer::ppuData#0 -Constant right-side identified [21] (byte~) ppuDataTransfer::ppuDataPrepare1_$1 ← < (const nomodify void*) ppuDataTransfer::ppuData#0 +Alias candidate removed (volatile)conio_line_text = gotoxy::$5 +Identical Phi Values (byte) uctoa::max_digits#7 (const byte) uctoa::max_digits#2 +Identical Phi Values (byte*) uctoa::digit_values#8 (const byte*) uctoa::digit_values#2 +Successful SSA optimization Pass2IdenticalPhiElimination +Simple Condition (bool~) uctoa::$11 [127] if((byte) 0!=(byte) uctoa::started#2) goto uctoa::@14 +Simple Condition (bool~) uctoa::$6 [227] if((byte) uctoa::value#2>=(byte) uctoa::digit_value#0) goto uctoa::@14 +Successful SSA optimization Pass2ConditionalJumpSimplification +Constant right-side identified [122] (byte~) uctoa::$4 ← (const byte) uctoa::max_digits#2 - (byte) 1 +Constant right-side identified [173] (byte~) main::$8 ← (const byte) main::screensizex1_return#0 - (byte) 1 +Constant right-side identified [177] (byte) cputcxy::y#1 ← (const byte) main::screensizey1_return#0 - (byte) 4 +Constant right-side identified [182] (byte~) main::$15 ← (const byte) main::screensizey2_return#0 - (byte) 3 +Constant right-side identified [186] (byte) cputcxy::x#3 ← (const byte) main::screensizex2_return#0 - (byte) 2 Successful SSA optimization Pass2ConstantRValueConsolidation -Constant (const byte) ppuDataTransfer::ppuDataPrepare1_$0 = >ppuDataTransfer::ppuData#0 -Constant (const byte) ppuDataTransfer::ppuDataPrepare1_$1 = (const nomodify void*) ppuDataTransfer::ppuData#0 +Constant inlined cputs::s#1 = (const byte*) num_buffer +Constant inlined main::$15 = (const byte) main::screensizey2_return#0-(byte) 3 +Constant inlined cputcxy::y#0 = (byte) 1 +Constant inlined cputcxy::y#1 = (const byte) main::screensizey1_return#0-(byte) 4 Constant inlined main::initNES1_waitForVBlank2_$3 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined ppuDataFetch::ppuDataPrepare1_$4 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined ppuDataFetch::ppuDataPrepare1_$5 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined CONIO_SCREEN_TEXT = (const nomodify byte*) PPU_NAME_TABLE_0 Constant inlined ppuDataFill::ppuDataPrepare1_$4 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined ppuDataTransfer::ppuDataPrepare1_$5 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined ppuDataFill::ppuDataPrepare1_$5 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined ppuDataTransfer::ppuDataPrepare1_$4 = (byte*)(const struct RICOH_2C02*) PPU -Constant inlined ppuDataGet::ppuDataPrepare1_$4 = (byte*)(const struct RICOH_2C02*) PPU -Constant inlined ppuDataGet::ppuDataPrepare1_$5 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined ppuDataFill::ppuData#1 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0+(word)(number) $1e*(number) $20-(byte) $20 Constant inlined ppuDataFill::ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0 Constant inlined ppuDataFill::ppuData#3 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_1 Constant inlined ppuDataFill::ppuData#2 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 -Constant inlined ppuDataTransfer::cpuSrc#0 = (byte*)(const nomodify void*) ppuDataTransfer::cpuData#0 -Constant inlined cscroll::x#0 = (byte) 0 Constant inlined cscroll::line1#0 = (const nomodify byte*) PPU_NAME_TABLE_0 +Constant inlined uctoa::digit#0 = (byte) 0 Constant inlined vblank::$15 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined vblank::$16 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined main::initNES1_i#0 = (byte) 0 +Constant inlined main::y#0 = (byte) 1 +Constant inlined gotoxy::x#0 = (byte) 0 Constant inlined ppuDataSet::ppuDataPrepare1_$5 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined ppuDataSet::ppuDataPrepare1_$4 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined ppuDataFill::i#0 = (word) 0 +Constant inlined ppuDataFetch::ppuDataRead1_$1 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined uctoa::$4 = (const byte) uctoa::max_digits#2-(byte) 1 +Constant inlined uctoa::digit_values#2 = (const byte*) RADIX_HEXADECIMAL_VALUES_CHAR +Constant inlined uctoa::started#0 = (byte) 0 +Constant inlined uctoa::started#1 = (byte) 1 Constant inlined main::enableVideoOutput1_$3 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined ppuDataFill::val#3 = (byte) 0 +Constant inlined cputcxy::x#3 = (const byte) main::screensizex2_return#0-(byte) 2 Constant inlined main::enableVideoOutput1_$2 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined readJoy1::i#0 = (byte) 0 Constant inlined ppuDataFill::val#2 = (byte) 0 @@ -1784,14 +2750,30 @@ Constant inlined ppuDataTransfer::ppuDataPut1_$1 = (byte*)(const struct RICOH_2C Constant inlined ppuDataFill::val#1 = (byte) ' ' Constant inlined ppuDataFill::ppuDataPut1_$1 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined ppuDataFill::val#0 = (byte) ' ' +Constant inlined cputcxy::x#2 = (byte) 1 +Constant inlined cputsxy::s#0 = (const byte*) num_buffer +Constant inlined ppuDataFetch::cpuDst#0 = (byte*)(const nomodify void*) ppuDataFetch::cpuData#0 +Constant inlined main::i#0 = (byte) 0 Constant inlined main::initNES1_disableVideoOutput1_$3 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined main::initNES1_disableVideoOutput1_$2 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined main::initNES1_disableAudioOutput1_$1 = (byte*)(const struct RICOH_2A03*) APU Constant inlined readJoy1::joy#0 = (byte) 0 +Constant inlined ppuDataTransfer::cpuData#1 = (void*)(const byte*) PALETTE Constant inlined cscroll::y#0 = (byte) 0 Constant inlined cscroll::line2#0 = (const nomodify byte*) PPU_NAME_TABLE_0+(byte) $20 +Constant inlined ppuDataTransfer::cpuData#0 = (void*)(const byte*) scroll_buffer +Constant inlined ppuDataTransfer::ppuData#1 = (void*)(const nomodify byte*) PPU_PALETTE +Constant inlined cputcxy::c#3 = (byte) 'i' +Constant inlined cputcxy::c#2 = (byte) 'i' +Constant inlined cputcxy::c#1 = (byte) '-' +Constant inlined cputcxy::c#0 = (byte) '-' +Constant inlined ppuDataTransfer::size#1 = (byte) $20*(const byte) SIZEOF_BYTE +Constant inlined main::x#0 = (byte) 1 +Constant inlined ppuDataTransfer::size#0 = (byte) $20 +Constant inlined uctoa::buffer#5 = (const byte*) num_buffer Constant inlined readJoy1::$9 = (byte*)(const struct RICOH_2A03*) APU -Constant inlined ppuDataGet::ppuDataRead1_$1 = (byte*)(const struct RICOH_2C02*) PPU +Constant inlined ppuDataFetch::i#0 = (word) 0 +Constant inlined gotoxy::y#0 = (byte) 0 Constant inlined main::initNES1_waitForVBlank1_$3 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined ppuDataSet::ppuDataPut1_$1 = (byte*)(const struct RICOH_2C02*) PPU Constant inlined ppuDataFill::size#1 = (byte) $20 @@ -1799,6 +2781,7 @@ Constant inlined ppuDataFill::size#0 = (word) $3c0 Constant inlined readJoy1::$7 = (byte*)(const struct RICOH_2A03*) APU Constant inlined ppuDataFill::size#3 = (byte) $40 Constant inlined readJoy1::$8 = (byte*)(const struct RICOH_2A03*) APU +Constant inlined main::$8 = (const byte) main::screensizex1_return#0-(byte) 1 Constant inlined ppuDataFill::size#2 = (byte) $40 Successful SSA optimization Pass2ConstantInlining Consolidated array index constant in *((byte*)APU+OFFSET_STRUCT_RICOH_2A03_JOY1) @@ -1824,7 +2807,12 @@ Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_PPUMA Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) Consolidated array index constant in *((byte*)PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) Successful SSA optimization Pass2ConstantAdditionElimination -Added new block during phi lifting main::@8(between main::initNES1_@1 and main::initNES1_@1) +Alias candidate removed (volatile)conio_line_text = gotoxy::$5 +Alias candidate removed (volatile)conio_line_text = gotoxy::$5 +Added new block during phi lifting gotoxy::@5(between gotoxy and gotoxy::@1) +Added new block during phi lifting gotoxy::@6(between gotoxy::@1 and gotoxy::@2) +Added new block during phi lifting uctoa::@17(between uctoa::@16 and uctoa::@13) +Added new block during phi lifting main::@24(between main::initNES1_@1 and main::initNES1_@1) Adding NOP phi() at start of @begin Adding NOP phi() at start of @3 Adding NOP phi() at start of @4 @@ -1833,13 +2821,24 @@ Adding NOP phi() at start of main Adding NOP phi() at start of main::initNES1_waitForVBlank1 Adding NOP phi() at start of main::initNES1_@6 Adding NOP phi() at start of main::initNES1_waitForVBlank2 +Adding NOP phi() at start of main::@8 +Adding NOP phi() at start of main::@14 +Adding NOP phi() at start of main::@15 +Adding NOP phi() at start of main::@16 +Adding NOP phi() at start of main::@17 +Adding NOP phi() at start of main::screensizex1_@return Adding NOP phi() at start of main::@2 -Adding NOP phi() at start of main::@3 +Adding NOP phi() at start of main::screensizey2_@return Adding NOP phi() at start of main::@4 -Adding NOP phi() at start of main::@5 -Adding NOP phi() at start of main::@6 -Adding NOP phi() at start of main::@1 -Adding NOP phi() at start of cputs +Adding NOP phi() at start of main::screensizey3_@return +Adding NOP phi() at start of main::@7 +Adding NOP phi() at start of main::@20 +Adding NOP phi() at start of main::screensizex2 +Adding NOP phi() at start of main::screensizex2_@return +Adding NOP phi() at start of main::@18 +Adding NOP phi() at start of main::screensizey1 +Adding NOP phi() at start of main::screensizey1_@return +Adding NOP phi() at start of cputcxy::@2 Adding NOP phi() at start of cputc::@3 Adding NOP phi() at start of cputc::@6 Adding NOP phi() at start of cputc::@1 @@ -1848,94 +2847,170 @@ Adding NOP phi() at start of cputln::@1 Adding NOP phi() at start of cscroll::@1 Adding NOP phi() at start of cscroll::@3 Adding NOP phi() at start of cscroll::@6 -Adding NOP phi() at start of ppuDataSet::@1 -Adding NOP phi() at start of ppuDataGet -Adding NOP phi() at start of ppuDataGet::ppuDataRead1_@return -Adding NOP phi() at start of ppuDataGet::@1 +Adding NOP phi() at start of ppuDataFetch +Adding NOP phi() at start of ppuDataFetch::ppuDataRead1_@return Adding NOP phi() at start of ppuDataFill::@3 Adding NOP phi() at start of ppuDataFill::@2 +Adding NOP phi() at start of ppuDataSet +Adding NOP phi() at start of ppuDataSet::@1 +Adding NOP phi() at start of gotoxy::@3 +Adding NOP phi() at start of gotoxy::@4 +Adding NOP phi() at start of cputsxy::@1 +Adding NOP phi() at start of cputsxy::@2 +Adding NOP phi() at start of cputs +Adding NOP phi() at start of uctoa +Adding NOP phi() at start of uctoa::@6 +Adding NOP phi() at start of uctoa::@2 Adding NOP phi() at start of clrscr -Adding NOP phi() at start of ppuDataTransfer -Adding NOP phi() at start of ppuDataTransfer::@3 Adding NOP phi() at start of vblank Adding NOP phi() at start of readJoy1::@3 CALL GRAPH Calls in [] to main:7 -Calls in [main] to ppuDataTransfer:37 ppuDataFill:39 ppuDataFill:41 clrscr:43 cputs:45 -Calls in [cputs] to cputc:59 -Calls in [cputc] to ppuDataSet:66 cputln:70 cputln:74 -Calls in [cputln] to cscroll:79 -Calls in [cscroll] to ppuDataFill:88 ppuDataGet:101 ppuDataSet:109 -Calls in [clrscr] to ppuDataFill:146 -Calls in [vblank] to readJoy1:165 +Calls in [main] to ppuDataTransfer:37 ppuDataFill:39 ppuDataFill:41 clrscr:43 uctoa:62 cputsxy:65 cputcxy:70 cputcxy:76 cputcxy:81 cputcxy:87 +Calls in [cputcxy] to gotoxy:96 cputc:99 +Calls in [cputc] to ppuDataSet:106 cputln:110 cputln:114 +Calls in [cputln] to cscroll:119 +Calls in [cscroll] to ppuDataFill:128 ppuDataFetch:133 ppuDataTransfer:136 +Calls in [cputsxy] to gotoxy:215 cputs:217 +Calls in [cputs] to cputc:228 +Calls in [uctoa] to uctoa_append:255 +Calls in [clrscr] to ppuDataFill:271 +Calls in [vblank] to readJoy1:277 -Created 18 initial phi equivalence classes -Coalesced [51] main::initNES1_i#3 ← main::initNES1_i#1 -Coalesced [60] cputs::s#6 ← cputs::s#0 -Coalesced [65] ppuDataSet::val#5 ← ppuDataSet::val#0 -Coalesced [92] cscroll::line2#11 ← cscroll::line2#6 -Coalesced [93] cscroll::line1#11 ← cscroll::line1#6 -Coalesced [97] cscroll::y#9 ← cscroll::y#1 -Coalesced (already) [98] cscroll::line2#9 ← cscroll::line2#2 -Coalesced (already) [99] cscroll::line1#9 ← cscroll::line1#2 -Coalesced [107] ppuDataSet::ppuDataPrepare1_ppuData#3 ← ppuDataSet::ppuData#1 -Coalesced [108] ppuDataSet::val#6 ← ppuDataSet::val#1 -Coalesced [112] cscroll::x#6 ← cscroll::x#1 -Coalesced [113] cscroll::line2#10 ← cscroll::line2#1 -Coalesced [114] cscroll::line1#10 ← cscroll::line1#1 -Coalesced [144] ppuDataFill::i#6 ← ppuDataFill::i#1 -Coalesced [162] ppuDataTransfer::i#6 ← ppuDataTransfer::i#1 -Coalesced [163] ppuDataTransfer::cpuSrc#6 ← ppuDataTransfer::cpuSrc#1 -Coalesced [197] readJoy1::i#4 ← readJoy1::i#1 -Coalesced [198] readJoy1::joy#5 ← readJoy1::joy#1 -Coalesced down to 16 phi equivalence classes +Created 38 initial phi equivalence classes +Coalesced [67] main::i#8 ← main::i#1 +Coalesced [69] cputcxy::y#6 ← cputcxy::y#2 +Coalesced [75] cputcxy::y#5 ← cputcxy::y#3 +Coalesced [78] main::y#11 ← main::y#1 +Coalesced [80] cputcxy::x#5 ← cputcxy::x#0 +Coalesced [86] cputcxy::x#6 ← cputcxy::x#1 +Coalesced [89] main::x#11 ← main::x#1 +Coalesced [90] main::initNES1_i#3 ← main::initNES1_i#1 +Coalesced [94] gotoxy::y#8 ← gotoxy::y#2 +Coalesced [95] gotoxy::x#8 ← gotoxy::x#2 +Coalesced [98] cputc::c#4 ← cputc::c#1 +Coalesced [135] ppuDataTransfer::ppuDataPrepare1_ppuData#2 ← ppuDataTransfer::ppuData#0 +Coalesced [140] cscroll::y#6 ← cscroll::y#1 +Coalesced [141] cscroll::line2#6 ← cscroll::line2#1 +Coalesced [142] cscroll::line1#6 ← cscroll::line1#1 +Coalesced [156] ppuDataTransfer::i#6 ← ppuDataTransfer::i#1 +Coalesced [157] ppuDataTransfer::cpuSrc#7 ← ppuDataTransfer::cpuSrc#1 +Coalesced [172] ppuDataFetch::i#6 ← ppuDataFetch::i#1 +Coalesced [173] ppuDataFetch::cpuDst#6 ← ppuDataFetch::cpuDst#1 +Coalesced [186] ppuDataFill::i#6 ← ppuDataFill::i#1 +Coalesced [209] gotoxy::x#10 ← gotoxy::x#4 +Coalesced [210] gotoxy::y#10 ← gotoxy::y#4 +Coalesced [213] gotoxy::y#9 ← gotoxy::y#3 +Coalesced [214] gotoxy::x#9 ← gotoxy::x#3 +Coalesced [227] cputc::c#5 ← cputc::c#0 +Coalesced [229] cputs::s#6 ← cputs::s#0 +Coalesced [233] uctoa::value#17 ← uctoa::value#1 +Coalesced [243] uctoa::value#18 ← uctoa::value#2 +Coalesced [244] uctoa::started#6 ← uctoa::started#2 +Coalesced [245] uctoa::buffer#23 ← uctoa::buffer#11 +Coalesced [248] uctoa::digit#7 ← uctoa::digit#1 +Coalesced (already) [249] uctoa::value#16 ← uctoa::value#6 +Coalesced (already) [250] uctoa::started#5 ← uctoa::started#4 +Coalesced (already) [251] uctoa::buffer#22 ← uctoa::buffer#14 +Coalesced [259] uctoa::value#19 ← uctoa::value#0 +Coalesced [260] uctoa::buffer#24 ← uctoa::buffer#4 +Coalesced [261] uctoa_append::value#6 ← uctoa_append::value#0 +Coalesced [268] uctoa_append::value#7 ← uctoa_append::value#1 +Coalesced [269] uctoa_append::digit#5 ← uctoa_append::digit#1 +Coalesced [309] readJoy1::i#4 ← readJoy1::i#1 +Coalesced [310] readJoy1::joy#5 ← readJoy1::joy#1 +Coalesced down to 33 phi equivalence classes Culled Empty Block (label) @4 Culled Empty Block (label) main::initNES1_@6 -Culled Empty Block (label) main::@8 -Culled Empty Block (label) cputs::@3 +Culled Empty Block (label) main::@17 +Culled Empty Block (label) main::screensizex1_@return +Culled Empty Block (label) main::@2 +Culled Empty Block (label) main::screensizey2_@return +Culled Empty Block (label) main::@4 +Culled Empty Block (label) main::screensizey3_@return +Culled Empty Block (label) main::@20 +Culled Empty Block (label) main::screensizex2_@return +Culled Empty Block (label) main::@18 +Culled Empty Block (label) main::screensizey1_@return +Culled Empty Block (label) main::@24 +Culled Empty Block (label) cputcxy::@2 Culled Empty Block (label) cputc::@6 Culled Empty Block (label) cputc::@4 Culled Empty Block (label) cputln::@1 Culled Empty Block (label) cscroll::@1 Culled Empty Block (label) cscroll::@3 -Culled Empty Block (label) cscroll::@5 -Culled Empty Block (label) ppuDataSet::@1 -Culled Empty Block (label) ppuDataGet::ppuDataRead1_@return -Culled Empty Block (label) ppuDataGet::@1 +Culled Empty Block (label) ppuDataFetch::ppuDataRead1_@return Culled Empty Block (label) ppuDataFill::@3 Culled Empty Block (label) ppuDataFill::@2 -Culled Empty Block (label) ppuDataTransfer::@3 +Culled Empty Block (label) ppuDataSet::@1 +Culled Empty Block (label) gotoxy::@3 +Culled Empty Block (label) gotoxy::@4 +Culled Empty Block (label) cputsxy::@2 +Culled Empty Block (label) cputs::@3 +Culled Empty Block (label) uctoa::@6 +Culled Empty Block (label) uctoa::@2 +Culled Empty Block (label) uctoa::@5 +Culled Empty Block (label) uctoa::@17 Culled Empty Block (label) readJoy1::@3 Renumbering block ppuDataFill::@4 to ppuDataFill::@2 -Renumbering block ppuDataTransfer::@4 to ppuDataTransfer::@3 +Renumbering block gotoxy::@5 to gotoxy::@3 +Renumbering block gotoxy::@6 to gotoxy::@4 Renumbering block cputc::@5 to cputc::@4 Renumbering block cscroll::@4 to cscroll::@1 -Renumbering block cscroll::@6 to cscroll::@2 -Renumbering block cscroll::@7 to cscroll::@3 +Renumbering block cscroll::@5 to cscroll::@2 +Renumbering block cscroll::@6 to cscroll::@3 Renumbering block cscroll::@8 to cscroll::@4 Renumbering block cscroll::@9 to cscroll::@5 -Renumbering block cscroll::@11 to cscroll::@6 -Renumbering block cscroll::@12 to cscroll::@7 -Renumbering block cscroll::@13 to cscroll::@8 +Renumbering block cscroll::@10 to cscroll::@6 +Renumbering block uctoa::@10 to uctoa::@1 +Renumbering block uctoa::@11 to uctoa::@2 +Renumbering block uctoa::@12 to uctoa::@3 +Renumbering block uctoa::@13 to uctoa::@4 +Renumbering block uctoa::@14 to uctoa::@5 +Renumbering block uctoa::@15 to uctoa::@6 +Renumbering block uctoa::@16 to uctoa::@7 +Renumbering block main::@3 to main::@2 +Renumbering block main::@5 to main::@3 +Renumbering block main::@6 to main::@4 +Renumbering block main::@7 to main::@5 +Renumbering block main::@8 to main::@6 +Renumbering block main::@9 to main::@7 +Renumbering block main::@10 to main::@8 +Renumbering block main::@11 to main::@9 +Renumbering block main::@12 to main::@10 +Renumbering block main::@13 to main::@11 +Renumbering block main::@14 to main::@12 +Renumbering block main::@15 to main::@13 +Renumbering block main::@16 to main::@14 +Renumbering block main::@19 to main::@15 +Renumbering block main::@21 to main::@16 +Renumbering block main::@22 to main::@17 +Renumbering block main::@23 to main::@18 Adding NOP phi() at start of @begin Adding NOP phi() at start of @3 Adding NOP phi() at start of @end Adding NOP phi() at start of main Adding NOP phi() at start of main::initNES1_waitForVBlank1 Adding NOP phi() at start of main::initNES1_waitForVBlank2 -Adding NOP phi() at start of main::@2 -Adding NOP phi() at start of main::@3 -Adding NOP phi() at start of main::@4 -Adding NOP phi() at start of main::@5 Adding NOP phi() at start of main::@6 -Adding NOP phi() at start of main::@1 -Adding NOP phi() at start of cputs +Adding NOP phi() at start of main::@12 +Adding NOP phi() at start of main::@13 +Adding NOP phi() at start of main::@14 +Adding NOP phi() at start of main::@5 +Adding NOP phi() at start of main::screensizex2 +Adding NOP phi() at start of main::screensizey1 Adding NOP phi() at start of cputc::@3 Adding NOP phi() at start of cputc::@1 -Adding NOP phi() at start of cscroll::@2 -Adding NOP phi() at start of ppuDataGet +Adding NOP phi() at start of cscroll::@3 +Adding NOP phi() at start of ppuDataFetch +Adding NOP phi() at start of ppuDataSet +Adding NOP phi() at start of gotoxy::@3 +Adding NOP phi() at start of gotoxy::@4 +Adding NOP phi() at start of cputsxy::@1 +Adding NOP phi() at start of cputs +Adding NOP phi() at start of uctoa +Adding NOP phi() at start of uctoa_append Adding NOP phi() at start of clrscr -Adding NOP phi() at start of ppuDataTransfer Adding NOP phi() at start of vblank FINAL CONTROL FLOW GRAPH @@ -2005,319 +3080,505 @@ main::initNES1_waitForVBlank2_@1: scope:[main] from main::initNES1_waitForVBlan to:main::initNES1_@7 main::initNES1_@7: scope:[main] from main::initNES1_waitForVBlank2_@1 asm { ldaPPU_PPUSTATUS } - to:main::@2 -main::@2: scope:[main] from main::initNES1_@7 + to:main::@6 +main::@6: scope:[main] from main::initNES1_@7 [34] phi() [35] call ppuDataTransfer - to:main::@3 -main::@3: scope:[main] from main::@2 + to:main::@12 +main::@12: scope:[main] from main::@6 [36] phi() [37] call ppuDataFill - to:main::@4 -main::@4: scope:[main] from main::@3 + to:main::@13 +main::@13: scope:[main] from main::@12 [38] phi() [39] call ppuDataFill - to:main::@5 -main::@5: scope:[main] from main::@4 + to:main::@14 +main::@14: scope:[main] from main::@13 [40] phi() [41] call clrscr - to:main::@6 -main::@6: scope:[main] from main::@5 - [42] phi() - [43] call cputs + to:main::screensizex1 +main::screensizex1: scope:[main] from main::@14 main::@15 + [42] (byte) main::x#10 ← phi( main::@14/(byte) 1 main::@15/(byte) main::x#1 ) to:main::@7 -main::@7: scope:[main] from main::@6 - [44] (volatile byte) x_scroll ← (byte) 0 - [45] (volatile byte) y_scroll ← (byte) -8 +main::@7: scope:[main] from main::screensizex1 + [43] if((byte) main::x#10<(const byte) main::screensizex1_return#0-(byte) 1) goto main::@1 + to:main::screensizey2 +main::screensizey2: scope:[main] from main::@16 main::@7 + [44] (byte) main::y#10 ← phi( main::@7/(byte) 1 main::@16/(byte) main::y#1 ) + to:main::@9 +main::@9: scope:[main] from main::screensizey2 + [45] if((byte) main::y#10<(const byte) main::screensizey2_return#0-(byte) 3) goto main::@2 + to:main::screensizey3 +main::screensizey3: scope:[main] from main::@18 main::@9 + [46] (byte) main::i#2 ← phi( main::@18/(byte) main::i#1 main::@9/(byte) 0 ) + to:main::@11 +main::@11: scope:[main] from main::screensizey3 + [47] if((byte) main::i#2<(const byte) main::screensizey3_return#0) goto main::@3 + to:main::@4 +main::@4: scope:[main] from main::@11 + [48] (volatile byte) x_scroll ← (byte) 0 + [49] (volatile byte) y_scroll ← (byte) -8 to:main::enableVideoOutput1 -main::enableVideoOutput1: scope:[main] from main::@7 - [46] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 - [47] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e - to:main::@1 -main::@1: scope:[main] from main::@1 main::enableVideoOutput1 - [48] phi() - to:main::@1 +main::enableVideoOutput1: scope:[main] from main::@4 + [50] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 + [51] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e + to:main::@5 +main::@5: scope:[main] from main::@5 main::enableVideoOutput1 + [52] phi() + to:main::@5 +main::@3: scope:[main] from main::@11 + [53] (byte) uctoa::value#1 ← (byte) main::i#2 & (byte) $f + [54] call uctoa + to:main::@17 +main::@17: scope:[main] from main::@3 + [55] (byte) cputsxy::x#0 ← (byte) main::i#2 + [56] (byte) cputsxy::y#0 ← (byte) main::i#2 + [57] call cputsxy + to:main::@18 +main::@18: scope:[main] from main::@17 + [58] (byte) main::i#1 ← ++ (byte) main::i#2 + to:main::screensizey3 +main::@2: scope:[main] from main::@9 + [59] (byte) cputcxy::y#2 ← (byte) main::y#10 + [60] call cputcxy + to:main::screensizex2 +main::screensizex2: scope:[main] from main::@2 + [61] phi() + to:main::@10 +main::@10: scope:[main] from main::screensizex2 + [62] (byte) cputcxy::y#3 ← (byte) main::y#10 + [63] call cputcxy + to:main::@16 +main::@16: scope:[main] from main::@10 + [64] (byte) main::y#1 ← ++ (byte) main::y#10 + to:main::screensizey2 +main::@1: scope:[main] from main::@7 + [65] (byte) cputcxy::x#0 ← (byte) main::x#10 + [66] call cputcxy + to:main::screensizey1 +main::screensizey1: scope:[main] from main::@1 + [67] phi() + to:main::@8 +main::@8: scope:[main] from main::screensizey1 + [68] (byte) cputcxy::x#1 ← (byte) main::x#10 + [69] call cputcxy + to:main::@15 +main::@15: scope:[main] from main::@8 + [70] (byte) main::x#1 ← ++ (byte) main::x#10 + to:main::screensizex1 -(void()) cputs((to_nomodify byte*) cputs::s) -cputs: scope:[cputs] from main::@6 - [49] phi() - to:cputs::@1 -cputs::@1: scope:[cputs] from cputs cputs::@2 - [50] (to_nomodify byte*) cputs::s#2 ← phi( cputs/(const byte*) main::s cputs::@2/(to_nomodify byte*) cputs::s#0 ) - [51] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#2) - [52] (to_nomodify byte*) cputs::s#0 ← ++ (to_nomodify byte*) cputs::s#2 - [53] if((byte) 0!=(byte) cputs::c#1) goto cputs::@2 - to:cputs::@return -cputs::@return: scope:[cputs] from cputs::@1 - [54] return +(void()) cputcxy((byte) cputcxy::x , (byte) cputcxy::y , (byte) cputcxy::c) +cputcxy: scope:[cputcxy] from main::@1 main::@10 main::@2 main::@8 + [71] (byte) cputcxy::c#4 ← phi( main::@1/(byte) '-' main::@8/(byte) '-' main::@10/(byte) 'i' main::@2/(byte) 'i' ) + [71] (byte) cputcxy::y#4 ← phi( main::@1/(byte) 1 main::@8/(const byte) main::screensizey1_return#0-(byte) 4 main::@10/(byte) cputcxy::y#3 main::@2/(byte) cputcxy::y#2 ) + [71] (byte) cputcxy::x#4 ← phi( main::@1/(byte) cputcxy::x#0 main::@8/(byte) cputcxy::x#1 main::@10/(const byte) main::screensizex2_return#0-(byte) 2 main::@2/(byte) 1 ) + [72] (byte) gotoxy::x#2 ← (byte) cputcxy::x#4 + [73] (byte) gotoxy::y#2 ← (byte) cputcxy::y#4 + [74] call gotoxy + to:cputcxy::@1 +cputcxy::@1: scope:[cputcxy] from cputcxy + [75] (byte) cputc::c#1 ← (byte) cputcxy::c#4 + [76] call cputc + to:cputcxy::@return +cputcxy::@return: scope:[cputcxy] from cputcxy::@1 + [77] return to:@return -cputs::@2: scope:[cputs] from cputs::@1 - [55] (byte) cputc::c#0 ← (byte) cputs::c#1 - [56] call cputc - to:cputs::@1 (void()) cputc((byte) cputc::c) -cputc: scope:[cputc] from cputs::@2 - [57] if((byte) cputc::c#0==(byte) ' +cputc: scope:[cputc] from cputcxy::@1 cputs::@2 + [78] (byte) cputc::c#2 ← phi( cputcxy::@1/(byte) cputc::c#1 cputs::@2/(byte) cputc::c#0 ) + [79] if((byte) cputc::c#2==(byte) ' ') goto cputc::@1 to:cputc::@2 cputc::@2: scope:[cputc] from cputc - [58] (nomodify byte*) ppuDataSet::ppuData#0 ← (byte*) conio_line_text + (byte) conio_cursor_x - [59] (byte) ppuDataSet::val#0 ← (byte) cputc::c#0 - [60] (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#2 ← (void*)(nomodify byte*) ppuDataSet::ppuData#0 - [61] call ppuDataSet + [80] (nomodify byte*) ppuDataSet::ppuData#0 ← (byte*) conio_line_text + (byte) conio_cursor_x + [81] (byte) ppuDataSet::val#0 ← (byte) cputc::c#2 + [82] call ppuDataSet to:cputc::@4 cputc::@4: scope:[cputc] from cputc::@2 - [62] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x - [63] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return + [83] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x + [84] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return to:cputc::@3 cputc::@3: scope:[cputc] from cputc::@4 - [64] phi() - [65] call cputln + [85] phi() + [86] call cputln to:cputc::@return cputc::@return: scope:[cputc] from cputc::@1 cputc::@3 cputc::@4 - [66] return + [87] return to:@return cputc::@1: scope:[cputc] from cputc - [67] phi() - [68] call cputln + [88] phi() + [89] call cputln to:cputc::@return (void()) cputln() cputln: scope:[cputln] from cputc::@1 cputc::@3 - [69] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $20 - [70] (byte) conio_cursor_x ← (byte) 0 - [71] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y - [72] call cscroll + [90] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $20 + [91] (byte) conio_cursor_x ← (byte) 0 + [92] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y + [93] call cscroll to:cputln::@return cputln::@return: scope:[cputln] from cputln - [73] return + [94] return to:@return (void()) cscroll() cscroll: scope:[cscroll] from cputln - [74] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return + [95] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return to:cscroll::@1 cscroll::@1: scope:[cscroll] from cscroll cscroll::@5 - [75] (byte*) cscroll::line1#6 ← phi( cscroll/(const nomodify byte*) PPU_NAME_TABLE_0 cscroll::@5/(byte*) cscroll::line1#2 ) - [75] (byte*) cscroll::line2#6 ← phi( cscroll/(const nomodify byte*) PPU_NAME_TABLE_0+(byte) $20 cscroll::@5/(byte*) cscroll::line2#2 ) - [75] (byte) cscroll::y#2 ← phi( cscroll/(byte) 0 cscroll::@5/(byte) cscroll::y#1 ) - [76] if((byte) cscroll::y#2<(byte)(number) $1e-(number) 1) goto cscroll::@3 - to:cscroll::@2 -cscroll::@2: scope:[cscroll] from cscroll::@1 - [77] phi() - [78] call ppuDataFill + [96] (byte*) cscroll::line1#2 ← phi( cscroll/(const nomodify byte*) PPU_NAME_TABLE_0 cscroll::@5/(byte*) cscroll::line1#1 ) + [96] (byte*) cscroll::line2#2 ← phi( cscroll/(const nomodify byte*) PPU_NAME_TABLE_0+(byte) $20 cscroll::@5/(byte*) cscroll::line2#1 ) + [96] (byte) cscroll::y#2 ← phi( cscroll/(byte) 0 cscroll::@5/(byte) cscroll::y#1 ) + [97] if((byte) cscroll::y#2<(byte)(number) $1e-(number) 1) goto cscroll::@2 + to:cscroll::@3 +cscroll::@3: scope:[cscroll] from cscroll::@1 + [98] phi() + [99] call ppuDataFill to:cscroll::@6 -cscroll::@6: scope:[cscroll] from cscroll::@2 - [79] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $20 - [80] (byte) conio_cursor_y ← -- (byte) conio_cursor_y +cscroll::@6: scope:[cscroll] from cscroll::@3 + [100] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $20 + [101] (byte) conio_cursor_y ← -- (byte) conio_cursor_y to:cscroll::@return cscroll::@return: scope:[cscroll] from cscroll cscroll::@6 - [81] return + [102] return to:@return -cscroll::@3: scope:[cscroll] from cscroll::@1 cscroll::@8 - [82] (byte*) cscroll::line1#2 ← phi( cscroll::@8/(byte*) cscroll::line1#1 cscroll::@1/(byte*) cscroll::line1#6 ) - [82] (byte*) cscroll::line2#2 ← phi( cscroll::@8/(byte*) cscroll::line2#1 cscroll::@1/(byte*) cscroll::line2#6 ) - [82] (byte) cscroll::x#2 ← phi( cscroll::@8/(byte) cscroll::x#1 cscroll::@1/(byte) 0 ) - [83] if((byte) cscroll::x#2<(byte) $20) goto cscroll::@4 +cscroll::@2: scope:[cscroll] from cscroll::@1 + [103] (nomodify void*) ppuDataFetch::ppuData#0 ← (void*)(byte*) cscroll::line2#2 + [104] call ppuDataFetch + to:cscroll::@4 +cscroll::@4: scope:[cscroll] from cscroll::@2 + [105] (nomodify void*) ppuDataTransfer::ppuData#0 ← (void*)(byte*) cscroll::line1#2 + [106] call ppuDataTransfer to:cscroll::@5 -cscroll::@5: scope:[cscroll] from cscroll::@3 - [84] (byte) cscroll::y#1 ← ++ (byte) cscroll::y#2 +cscroll::@5: scope:[cscroll] from cscroll::@4 + [107] (byte*) cscroll::line1#1 ← (byte*) cscroll::line1#2 + (byte) $20 + [108] (byte*) cscroll::line2#1 ← (byte*) cscroll::line2#2 + (byte) $20 + [109] (byte) cscroll::y#1 ← ++ (byte) cscroll::y#2 to:cscroll::@1 -cscroll::@4: scope:[cscroll] from cscroll::@3 - [85] (nomodify void*) ppuDataGet::ppuData#0 ← (void*)(byte*) cscroll::line2#2 - [86] call ppuDataGet - [87] (byte) ppuDataGet::return#2 ← (byte) ppuDataGet::ppuDataRead1_return#0 - to:cscroll::@7 -cscroll::@7: scope:[cscroll] from cscroll::@4 - [88] (byte) cscroll::ch#0 ← (byte) ppuDataGet::return#2 - [89] (byte*) cscroll::line2#1 ← ++ (byte*) cscroll::line2#2 - [90] (nomodify void*) ppuDataSet::ppuData#1 ← (void*)(byte*) cscroll::line1#2 - [91] (byte) ppuDataSet::val#1 ← (byte) cscroll::ch#0 - [92] call ppuDataSet - to:cscroll::@8 -cscroll::@8: scope:[cscroll] from cscroll::@7 - [93] (byte*) cscroll::line1#1 ← ++ (byte*) cscroll::line1#2 - [94] (byte) cscroll::x#1 ← ++ (byte) cscroll::x#2 - to:cscroll::@3 - -(void()) ppuDataSet((nomodify void*) ppuDataSet::ppuData , (byte) ppuDataSet::val) -ppuDataSet: scope:[ppuDataSet] from cputc::@2 cscroll::@7 - [95] (byte) ppuDataSet::val#2 ← phi( cputc::@2/(byte) ppuDataSet::val#0 cscroll::@7/(byte) ppuDataSet::val#1 ) - [95] (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 ← phi( cputc::@2/(nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#2 cscroll::@7/(nomodify void*) ppuDataSet::ppuData#1 ) - to:ppuDataSet::ppuDataPrepare1 -ppuDataSet::ppuDataPrepare1: scope:[ppuDataSet] from ppuDataSet - [96] (byte~) ppuDataSet::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 - [97] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$0 - [98] (byte~) ppuDataSet::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 - [99] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$1 - to:ppuDataSet::ppuDataPut1 -ppuDataSet::ppuDataPut1: scope:[ppuDataSet] from ppuDataSet::ppuDataPrepare1 - [100] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataSet::val#2 - to:ppuDataSet::@return -ppuDataSet::@return: scope:[ppuDataSet] from ppuDataSet::ppuDataPut1 - [101] return - to:@return - -(byte()) ppuDataGet((nomodify void*) ppuDataGet::ppuData) -ppuDataGet: scope:[ppuDataGet] from cscroll::@4 - [102] phi() - to:ppuDataGet::ppuDataPrepare1 -ppuDataGet::ppuDataPrepare1: scope:[ppuDataGet] from ppuDataGet - [103] (byte~) ppuDataGet::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataGet::ppuData#0 - [104] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataGet::ppuDataPrepare1_$0 - [105] (byte~) ppuDataGet::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataGet::ppuData#0 - [106] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataGet::ppuDataPrepare1_$1 - to:ppuDataGet::ppuDataRead1 -ppuDataGet::ppuDataRead1: scope:[ppuDataGet] from ppuDataGet::ppuDataPrepare1 - [107] (byte) ppuDataGet::ppuDataRead1_return#0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) - to:ppuDataGet::@return -ppuDataGet::@return: scope:[ppuDataGet] from ppuDataGet::ppuDataRead1 - [108] return - to:@return - -(void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) -ppuDataFill: scope:[ppuDataFill] from clrscr cscroll::@2 main::@3 main::@4 - [109] (byte) ppuDataFill::val#10 ← phi( clrscr/(byte) ' ' cscroll::@2/(byte) ' ' main::@3/(byte) 0 main::@4/(byte) 0 ) - [109] (word) ppuDataFill::size#5 ← phi( clrscr/(word) $3c0 cscroll::@2/(byte) $20 main::@3/(byte) $40 main::@4/(byte) $40 ) - [109] (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ← phi( clrscr/(void*)(const nomodify byte*) PPU_NAME_TABLE_0 cscroll::@2/(void*)(const nomodify byte*) PPU_NAME_TABLE_0+(word)(number) $1e*(number) $20-(byte) $20 main::@3/(void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 main::@4/(void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_1 ) - to:ppuDataFill::ppuDataPrepare1 -ppuDataFill::ppuDataPrepare1: scope:[ppuDataFill] from ppuDataFill - [110] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 - [111] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 - [112] (byte~) ppuDataFill::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 - [113] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$1 - to:ppuDataFill::@1 -ppuDataFill::@1: scope:[ppuDataFill] from ppuDataFill::@2 ppuDataFill::ppuDataPrepare1 - [114] (word) ppuDataFill::i#2 ← phi( ppuDataFill::ppuDataPrepare1/(word) 0 ppuDataFill::@2/(word) ppuDataFill::i#1 ) - [115] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#5) goto ppuDataFill::ppuDataPut1 - to:ppuDataFill::@return -ppuDataFill::@return: scope:[ppuDataFill] from ppuDataFill::@1 - [116] return - to:@return -ppuDataFill::ppuDataPut1: scope:[ppuDataFill] from ppuDataFill::@1 - [117] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataFill::val#10 - to:ppuDataFill::@2 -ppuDataFill::@2: scope:[ppuDataFill] from ppuDataFill::ppuDataPut1 - [118] (word) ppuDataFill::i#1 ← ++ (word) ppuDataFill::i#2 - to:ppuDataFill::@1 - -(void()) clrscr() -clrscr: scope:[clrscr] from main::@5 - [119] phi() - [120] call ppuDataFill - to:clrscr::@1 -clrscr::@1: scope:[clrscr] from clrscr - [121] (byte) conio_cursor_x ← (byte) 0 - [122] (byte) conio_cursor_y ← (byte) 0 - [123] (byte*) conio_line_text ← (const nomodify byte*) PPU_NAME_TABLE_0 - to:clrscr::@return -clrscr::@return: scope:[clrscr] from clrscr::@1 - [124] return - to:@return (void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size) -ppuDataTransfer: scope:[ppuDataTransfer] from main::@2 - [125] phi() +ppuDataTransfer: scope:[ppuDataTransfer] from cscroll::@4 main::@6 + [110] (word) ppuDataTransfer::size#3 ← phi( cscroll::@4/(byte) $20 main::@6/(byte) $20*(const byte) SIZEOF_BYTE ) + [110] (nomodify void*) ppuDataTransfer::cpuData#2 ← phi( cscroll::@4/(void*)(const byte*) scroll_buffer main::@6/(void*)(const byte*) PALETTE ) + [110] (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 ← phi( cscroll::@4/(nomodify void*) ppuDataTransfer::ppuData#0 main::@6/(void*)(const nomodify byte*) PPU_PALETTE ) to:ppuDataTransfer::ppuDataPrepare1 ppuDataTransfer::ppuDataPrepare1: scope:[ppuDataTransfer] from ppuDataTransfer - [126] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← >(const nomodify void*) ppuDataTransfer::ppuData#0 - [127] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte) 0 + [111] (byte~) ppuDataTransfer::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 + [112] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$0 + [113] (byte~) ppuDataTransfer::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 + [114] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$1 + to:ppuDataTransfer::@3 +ppuDataTransfer::@3: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPrepare1 + [115] (byte*) ppuDataTransfer::cpuSrc#6 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 to:ppuDataTransfer::@1 -ppuDataTransfer::@1: scope:[ppuDataTransfer] from ppuDataTransfer::@3 ppuDataTransfer::ppuDataPrepare1 - [128] (byte*) ppuDataTransfer::cpuSrc#2 ← phi( ppuDataTransfer::ppuDataPrepare1/(byte*)(const nomodify void*) ppuDataTransfer::cpuData#0 ppuDataTransfer::@3/(byte*) ppuDataTransfer::cpuSrc#1 ) - [128] (word) ppuDataTransfer::i#2 ← phi( ppuDataTransfer::ppuDataPrepare1/(word) 0 ppuDataTransfer::@3/(word) ppuDataTransfer::i#1 ) - [129] if((word) ppuDataTransfer::i#2<(const word) ppuDataTransfer::size#0) goto ppuDataTransfer::@2 +ppuDataTransfer::@1: scope:[ppuDataTransfer] from ppuDataTransfer::@3 ppuDataTransfer::@4 + [116] (byte*) ppuDataTransfer::cpuSrc#2 ← phi( ppuDataTransfer::@3/(byte*) ppuDataTransfer::cpuSrc#6 ppuDataTransfer::@4/(byte*) ppuDataTransfer::cpuSrc#1 ) + [116] (word) ppuDataTransfer::i#2 ← phi( ppuDataTransfer::@3/(word) 0 ppuDataTransfer::@4/(word) ppuDataTransfer::i#1 ) + [117] if((word) ppuDataTransfer::i#2<(word) ppuDataTransfer::size#3) goto ppuDataTransfer::@2 to:ppuDataTransfer::@return ppuDataTransfer::@return: scope:[ppuDataTransfer] from ppuDataTransfer::@1 - [130] return + [118] return to:@return ppuDataTransfer::@2: scope:[ppuDataTransfer] from ppuDataTransfer::@1 - [131] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) + [119] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) to:ppuDataTransfer::ppuDataPut1 ppuDataTransfer::ppuDataPut1: scope:[ppuDataTransfer] from ppuDataTransfer::@2 - [132] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 - to:ppuDataTransfer::@3 -ppuDataTransfer::@3: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPut1 - [133] (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#2 - [134] (word) ppuDataTransfer::i#1 ← ++ (word) ppuDataTransfer::i#2 + [120] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 + to:ppuDataTransfer::@4 +ppuDataTransfer::@4: scope:[ppuDataTransfer] from ppuDataTransfer::ppuDataPut1 + [121] (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#2 + [122] (word) ppuDataTransfer::i#1 ← ++ (word) ppuDataTransfer::i#2 to:ppuDataTransfer::@1 +(void()) ppuDataFetch((nomodify void*) ppuDataFetch::cpuData , (nomodify void*) ppuDataFetch::ppuData , (word) ppuDataFetch::size) +ppuDataFetch: scope:[ppuDataFetch] from cscroll::@2 + [123] phi() + to:ppuDataFetch::ppuDataPrepare1 +ppuDataFetch::ppuDataPrepare1: scope:[ppuDataFetch] from ppuDataFetch + [124] (byte~) ppuDataFetch::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFetch::ppuData#0 + [125] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFetch::ppuDataPrepare1_$0 + [126] (byte~) ppuDataFetch::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFetch::ppuData#0 + [127] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFetch::ppuDataPrepare1_$1 + to:ppuDataFetch::@2 +ppuDataFetch::@2: scope:[ppuDataFetch] from ppuDataFetch::ppuDataPrepare1 + asm { ldaPPU_PPUDATA } + to:ppuDataFetch::@1 +ppuDataFetch::@1: scope:[ppuDataFetch] from ppuDataFetch::@2 ppuDataFetch::@3 + [129] (byte*) ppuDataFetch::cpuDst#2 ← phi( ppuDataFetch::@2/(byte*)(const nomodify void*) ppuDataFetch::cpuData#0 ppuDataFetch::@3/(byte*) ppuDataFetch::cpuDst#1 ) + [129] (word) ppuDataFetch::i#2 ← phi( ppuDataFetch::@2/(word) 0 ppuDataFetch::@3/(word) ppuDataFetch::i#1 ) + [130] if((word) ppuDataFetch::i#2<(const word) ppuDataFetch::size#0) goto ppuDataFetch::ppuDataRead1 + to:ppuDataFetch::@return +ppuDataFetch::@return: scope:[ppuDataFetch] from ppuDataFetch::@1 + [131] return + to:@return +ppuDataFetch::ppuDataRead1: scope:[ppuDataFetch] from ppuDataFetch::@1 + [132] (byte) ppuDataFetch::ppuDataRead1_return#0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) + to:ppuDataFetch::@3 +ppuDataFetch::@3: scope:[ppuDataFetch] from ppuDataFetch::ppuDataRead1 + [133] *((byte*) ppuDataFetch::cpuDst#2) ← (byte) ppuDataFetch::ppuDataRead1_return#0 + [134] (byte*) ppuDataFetch::cpuDst#1 ← ++ (byte*) ppuDataFetch::cpuDst#2 + [135] (word) ppuDataFetch::i#1 ← ++ (word) ppuDataFetch::i#2 + to:ppuDataFetch::@1 + +(void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) +ppuDataFill: scope:[ppuDataFill] from clrscr cscroll::@3 main::@12 main::@13 + [136] (byte) ppuDataFill::val#10 ← phi( clrscr/(byte) ' ' cscroll::@3/(byte) ' ' main::@12/(byte) 0 main::@13/(byte) 0 ) + [136] (word) ppuDataFill::size#5 ← phi( clrscr/(word) $3c0 cscroll::@3/(byte) $20 main::@12/(byte) $40 main::@13/(byte) $40 ) + [136] (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ← phi( clrscr/(void*)(const nomodify byte*) PPU_NAME_TABLE_0 cscroll::@3/(void*)(const nomodify byte*) PPU_NAME_TABLE_0+(word)(number) $1e*(number) $20-(byte) $20 main::@12/(void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 main::@13/(void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_1 ) + to:ppuDataFill::ppuDataPrepare1 +ppuDataFill::ppuDataPrepare1: scope:[ppuDataFill] from ppuDataFill + [137] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 + [138] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 + [139] (byte~) ppuDataFill::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 + [140] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$1 + to:ppuDataFill::@1 +ppuDataFill::@1: scope:[ppuDataFill] from ppuDataFill::@2 ppuDataFill::ppuDataPrepare1 + [141] (word) ppuDataFill::i#2 ← phi( ppuDataFill::ppuDataPrepare1/(word) 0 ppuDataFill::@2/(word) ppuDataFill::i#1 ) + [142] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#5) goto ppuDataFill::ppuDataPut1 + to:ppuDataFill::@return +ppuDataFill::@return: scope:[ppuDataFill] from ppuDataFill::@1 + [143] return + to:@return +ppuDataFill::ppuDataPut1: scope:[ppuDataFill] from ppuDataFill::@1 + [144] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataFill::val#10 + to:ppuDataFill::@2 +ppuDataFill::@2: scope:[ppuDataFill] from ppuDataFill::ppuDataPut1 + [145] (word) ppuDataFill::i#1 ← ++ (word) ppuDataFill::i#2 + to:ppuDataFill::@1 + +(void()) ppuDataSet((nomodify void*) ppuDataSet::ppuData , (byte) ppuDataSet::val) +ppuDataSet: scope:[ppuDataSet] from cputc::@2 + [146] phi() + to:ppuDataSet::ppuDataPrepare1 +ppuDataSet::ppuDataPrepare1: scope:[ppuDataSet] from ppuDataSet + [147] (byte~) ppuDataSet::ppuDataPrepare1_$0 ← > (void*)(nomodify byte*) ppuDataSet::ppuData#0 + [148] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$0 + [149] (byte~) ppuDataSet::ppuDataPrepare1_$1 ← < (void*)(nomodify byte*) ppuDataSet::ppuData#0 + [150] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$1 + to:ppuDataSet::ppuDataPut1 +ppuDataSet::ppuDataPut1: scope:[ppuDataSet] from ppuDataSet::ppuDataPrepare1 + [151] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataSet::val#0 + to:ppuDataSet::@return +ppuDataSet::@return: scope:[ppuDataSet] from ppuDataSet::ppuDataPut1 + [152] return + to:@return + +(void()) gotoxy((byte) gotoxy::x , (byte) gotoxy::y) +gotoxy: scope:[gotoxy] from cputcxy cputsxy + [153] (byte) gotoxy::x#4 ← phi( cputcxy/(byte) gotoxy::x#2 cputsxy/(byte) gotoxy::x#3 ) + [153] (byte) gotoxy::y#4 ← phi( cputcxy/(byte) gotoxy::y#2 cputsxy/(byte) gotoxy::y#3 ) + [154] if((byte) gotoxy::y#4<(byte) $1e+(byte) 1) goto gotoxy::@3 + to:gotoxy::@1 +gotoxy::@3: scope:[gotoxy] from gotoxy + [155] phi() + to:gotoxy::@1 +gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@3 + [156] (byte) gotoxy::y#5 ← phi( gotoxy::@3/(byte) gotoxy::y#4 gotoxy/(byte) 0 ) + [157] if((byte) gotoxy::x#4<(byte) $20) goto gotoxy::@4 + to:gotoxy::@2 +gotoxy::@4: scope:[gotoxy] from gotoxy::@1 + [158] phi() + to:gotoxy::@2 +gotoxy::@2: scope:[gotoxy] from gotoxy::@1 gotoxy::@4 + [159] (byte) gotoxy::x#5 ← phi( gotoxy::@4/(byte) gotoxy::x#4 gotoxy::@1/(byte) 0 ) + [160] (byte) conio_cursor_x ← (byte) gotoxy::x#5 + [161] (byte) conio_cursor_y ← (byte) gotoxy::y#5 + [162] (word~) gotoxy::$6 ← (word)(byte) gotoxy::y#5 + [163] (word) gotoxy::line_offset#0 ← (word~) gotoxy::$6 << (byte) 5 + [164] (byte*~) gotoxy::$5 ← (const nomodify byte*) PPU_NAME_TABLE_0 + (word) gotoxy::line_offset#0 + [165] (byte*) conio_line_text ← (byte*~) gotoxy::$5 + to:gotoxy::@return +gotoxy::@return: scope:[gotoxy] from gotoxy::@2 + [166] return + to:@return + +(void()) cputsxy((byte) cputsxy::x , (byte) cputsxy::y , (to_nomodify byte*) cputsxy::s) +cputsxy: scope:[cputsxy] from main::@17 + [167] (byte) gotoxy::x#3 ← (byte) cputsxy::x#0 + [168] (byte) gotoxy::y#3 ← (byte) cputsxy::y#0 + [169] call gotoxy + to:cputsxy::@1 +cputsxy::@1: scope:[cputsxy] from cputsxy + [170] phi() + [171] call cputs + to:cputsxy::@return +cputsxy::@return: scope:[cputsxy] from cputsxy::@1 + [172] return + to:@return + +(void()) cputs((to_nomodify byte*) cputs::s) +cputs: scope:[cputs] from cputsxy::@1 + [173] phi() + to:cputs::@1 +cputs::@1: scope:[cputs] from cputs cputs::@2 + [174] (to_nomodify byte*) cputs::s#2 ← phi( cputs/(const byte*) num_buffer cputs::@2/(to_nomodify byte*) cputs::s#0 ) + [175] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#2) + [176] (to_nomodify byte*) cputs::s#0 ← ++ (to_nomodify byte*) cputs::s#2 + [177] if((byte) 0!=(byte) cputs::c#1) goto cputs::@2 + to:cputs::@return +cputs::@return: scope:[cputs] from cputs::@1 + [178] return + to:@return +cputs::@2: scope:[cputs] from cputs::@1 + [179] (byte) cputc::c#0 ← (byte) cputs::c#1 + [180] call cputc + to:cputs::@1 + +(void()) uctoa((byte) uctoa::value , (byte*) uctoa::buffer , (byte) uctoa::radix) +uctoa: scope:[uctoa] from main::@3 + [181] phi() + to:uctoa::@1 +uctoa::@1: scope:[uctoa] from uctoa uctoa::@4 + [182] (byte*) uctoa::buffer#11 ← phi( uctoa::@4/(byte*) uctoa::buffer#14 uctoa/(const byte*) num_buffer ) + [182] (byte) uctoa::started#2 ← phi( uctoa::@4/(byte) uctoa::started#4 uctoa/(byte) 0 ) + [182] (byte) uctoa::value#2 ← phi( uctoa::@4/(byte) uctoa::value#6 uctoa/(byte) uctoa::value#1 ) + [182] (byte) uctoa::digit#2 ← phi( uctoa::@4/(byte) uctoa::digit#1 uctoa/(byte) 0 ) + [183] if((byte) uctoa::digit#2<(const byte) uctoa::max_digits#2-(byte) 1) goto uctoa::@2 + to:uctoa::@3 +uctoa::@3: scope:[uctoa] from uctoa::@1 + [184] *((byte*) uctoa::buffer#11) ← *((const byte*) DIGITS + (byte) uctoa::value#2) + [185] (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#11 + [186] *((byte*) uctoa::buffer#3) ← (byte) 0 + to:uctoa::@return +uctoa::@return: scope:[uctoa] from uctoa::@3 + [187] return + to:@return +uctoa::@2: scope:[uctoa] from uctoa::@1 + [188] (byte) uctoa::digit_value#0 ← *((const byte*) RADIX_HEXADECIMAL_VALUES_CHAR + (byte) uctoa::digit#2) + [189] if((byte) 0!=(byte) uctoa::started#2) goto uctoa::@5 + to:uctoa::@7 +uctoa::@7: scope:[uctoa] from uctoa::@2 + [190] if((byte) uctoa::value#2>=(byte) uctoa::digit_value#0) goto uctoa::@5 + to:uctoa::@4 +uctoa::@4: scope:[uctoa] from uctoa::@6 uctoa::@7 + [191] (byte*) uctoa::buffer#14 ← phi( uctoa::@7/(byte*) uctoa::buffer#11 uctoa::@6/(byte*) uctoa::buffer#4 ) + [191] (byte) uctoa::started#4 ← phi( uctoa::@7/(byte) uctoa::started#2 uctoa::@6/(byte) 1 ) + [191] (byte) uctoa::value#6 ← phi( uctoa::@7/(byte) uctoa::value#2 uctoa::@6/(byte) uctoa::value#0 ) + [192] (byte) uctoa::digit#1 ← ++ (byte) uctoa::digit#2 + to:uctoa::@1 +uctoa::@5: scope:[uctoa] from uctoa::@2 uctoa::@7 + [193] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#11 + [194] (byte) uctoa_append::value#0 ← (byte) uctoa::value#2 + [195] (byte) uctoa_append::sub#0 ← (byte) uctoa::digit_value#0 + [196] call uctoa_append + [197] (byte) uctoa_append::return#0 ← (byte) uctoa_append::value#2 + to:uctoa::@6 +uctoa::@6: scope:[uctoa] from uctoa::@5 + [198] (byte) uctoa::value#0 ← (byte) uctoa_append::return#0 + [199] (byte*) uctoa::buffer#4 ← ++ (byte*) uctoa::buffer#11 + to:uctoa::@4 + +(byte()) uctoa_append((byte*) uctoa_append::buffer , (byte) uctoa_append::value , (byte) uctoa_append::sub) +uctoa_append: scope:[uctoa_append] from uctoa::@5 + [200] phi() + to:uctoa_append::@1 +uctoa_append::@1: scope:[uctoa_append] from uctoa_append uctoa_append::@2 + [201] (byte) uctoa_append::digit#2 ← phi( uctoa_append/(byte) 0 uctoa_append::@2/(byte) uctoa_append::digit#1 ) + [201] (byte) uctoa_append::value#2 ← phi( uctoa_append/(byte) uctoa_append::value#0 uctoa_append::@2/(byte) uctoa_append::value#1 ) + [202] if((byte) uctoa_append::value#2>=(byte) uctoa_append::sub#0) goto uctoa_append::@2 + to:uctoa_append::@3 +uctoa_append::@3: scope:[uctoa_append] from uctoa_append::@1 + [203] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2) + to:uctoa_append::@return +uctoa_append::@return: scope:[uctoa_append] from uctoa_append::@3 + [204] return + to:@return +uctoa_append::@2: scope:[uctoa_append] from uctoa_append::@1 + [205] (byte) uctoa_append::digit#1 ← ++ (byte) uctoa_append::digit#2 + [206] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0 + to:uctoa_append::@1 + +(void()) clrscr() +clrscr: scope:[clrscr] from main::@14 + [207] phi() + [208] call ppuDataFill + to:clrscr::@1 +clrscr::@1: scope:[clrscr] from clrscr + [209] (byte) conio_cursor_x ← (byte) 0 + [210] (byte) conio_cursor_y ← (byte) 0 + [211] (byte*) conio_line_text ← (const nomodify byte*) PPU_NAME_TABLE_0 + to:clrscr::@return +clrscr::@return: scope:[clrscr] from clrscr::@1 + [212] return + to:@return + interrupt(HARDWARE_STACK)(void()) vblank() vblank: scope:[vblank] from - [135] phi() - [136] call readJoy1 - [137] (byte) readJoy1::return#2 ← (byte) readJoy1::joy#2 + [213] phi() + [214] call readJoy1 + [215] (byte) readJoy1::return#2 ← (byte) readJoy1::joy#2 to:vblank::@11 vblank::@11: scope:[vblank] from vblank - [138] (byte) vblank::joy#0 ← (byte) readJoy1::return#2 - [139] (byte~) vblank::$1 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_DOWN - [140] if((byte) 0==(byte~) vblank::$1) goto vblank::@1 + [216] (byte) vblank::joy#0 ← (byte) readJoy1::return#2 + [217] (byte~) vblank::$1 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_DOWN + [218] if((byte) 0==(byte~) vblank::$1) goto vblank::@1 to:vblank::@5 vblank::@5: scope:[vblank] from vblank::@11 - [141] (volatile byte) y_scroll ← ++ (volatile byte) y_scroll - [142] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 + [219] (volatile byte) y_scroll ← ++ (volatile byte) y_scroll + [220] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 to:vblank::@6 vblank::@6: scope:[vblank] from vblank::@5 - [143] (volatile byte) y_scroll ← (byte) 0 + [221] (volatile byte) y_scroll ← (byte) 0 to:vblank::@1 vblank::@1: scope:[vblank] from vblank::@11 vblank::@5 vblank::@6 - [144] (byte~) vblank::$3 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_UP - [145] if((byte) 0==(byte~) vblank::$3) goto vblank::@2 + [222] (byte~) vblank::$3 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_UP + [223] if((byte) 0==(byte~) vblank::$3) goto vblank::@2 to:vblank::@7 vblank::@7: scope:[vblank] from vblank::@1 - [146] (volatile byte) y_scroll ← -- (volatile byte) y_scroll - [147] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 + [224] (volatile byte) y_scroll ← -- (volatile byte) y_scroll + [225] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 to:vblank::@8 vblank::@8: scope:[vblank] from vblank::@7 - [148] (volatile byte) y_scroll ← (byte) $ef + [226] (volatile byte) y_scroll ← (byte) $ef to:vblank::@2 vblank::@2: scope:[vblank] from vblank::@1 vblank::@7 vblank::@8 - [149] (byte~) vblank::$5 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_LEFT - [150] if((byte) 0==(byte~) vblank::$5) goto vblank::@3 + [227] (byte~) vblank::$5 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_LEFT + [228] if((byte) 0==(byte~) vblank::$5) goto vblank::@3 to:vblank::@9 vblank::@9: scope:[vblank] from vblank::@2 - [151] (volatile byte) x_scroll ← ++ (volatile byte) x_scroll + [229] (volatile byte) x_scroll ← ++ (volatile byte) x_scroll to:vblank::@3 vblank::@3: scope:[vblank] from vblank::@2 vblank::@9 - [152] (byte~) vblank::$7 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_RIGHT - [153] if((byte) 0==(byte~) vblank::$7) goto vblank::@4 + [230] (byte~) vblank::$7 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_RIGHT + [231] if((byte) 0==(byte~) vblank::$7) goto vblank::@4 to:vblank::@10 vblank::@10: scope:[vblank] from vblank::@3 - [154] (volatile byte) x_scroll ← -- (volatile byte) x_scroll + [232] (volatile byte) x_scroll ← -- (volatile byte) x_scroll to:vblank::@4 vblank::@4: scope:[vblank] from vblank::@10 vblank::@3 - [155] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) x_scroll - [156] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) y_scroll + [233] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) x_scroll + [234] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) y_scroll to:vblank::@return vblank::@return: scope:[vblank] from vblank::@4 - [157] return + [235] return to:@return (byte()) readJoy1() readJoy1: scope:[readJoy1] from vblank - [158] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 1 - [159] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 0 + [236] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 1 + [237] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 0 to:readJoy1::@1 readJoy1::@1: scope:[readJoy1] from readJoy1 readJoy1::@2 - [160] (byte) readJoy1::joy#2 ← phi( readJoy1/(byte) 0 readJoy1::@2/(byte) readJoy1::joy#1 ) - [160] (byte) readJoy1::i#2 ← phi( readJoy1/(byte) 0 readJoy1::@2/(byte) readJoy1::i#1 ) - [161] if((byte) readJoy1::i#2<(byte) 8) goto readJoy1::@2 + [238] (byte) readJoy1::joy#2 ← phi( readJoy1/(byte) 0 readJoy1::@2/(byte) readJoy1::joy#1 ) + [238] (byte) readJoy1::i#2 ← phi( readJoy1/(byte) 0 readJoy1::@2/(byte) readJoy1::i#1 ) + [239] if((byte) readJoy1::i#2<(byte) 8) goto readJoy1::@2 to:readJoy1::@return readJoy1::@return: scope:[readJoy1] from readJoy1::@1 - [162] return + [240] return to:@return readJoy1::@2: scope:[readJoy1] from readJoy1::@1 - [163] (byte~) readJoy1::$1 ← (byte) readJoy1::joy#2 << (byte) 1 - [164] (byte~) readJoy1::$2 ← *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) & (byte) 1 - [165] (byte) readJoy1::joy#1 ← (byte~) readJoy1::$1 | (byte~) readJoy1::$2 - [166] (byte) readJoy1::i#1 ← ++ (byte) readJoy1::i#2 + [241] (byte~) readJoy1::$1 ← (byte) readJoy1::joy#2 << (byte) 1 + [242] (byte~) readJoy1::$2 ← *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) & (byte) 1 + [243] (byte) readJoy1::joy#1 ← (byte~) readJoy1::$1 | (byte~) readJoy1::$2 + [244] (byte) readJoy1::i#1 ← ++ (byte) readJoy1::i#2 to:readJoy1::@1 +null depth in calling loop Loop head: cscroll::@1 tails: cscroll::@5 blocks: cscroll::@5 cscroll::@4 cscroll::@2 cscroll::@1 in scope ppuDataTransfer +null depth in calling loop Loop head: cputs::@1 tails: cputs::@2 blocks: cputs::@2 cputs::@1 in scope cputc +null depth in calling loop Loop head: cputs::@1 tails: cputs::@2 blocks: cputs::@2 cputs::@1 in scope cputc null depth in calling loop Loop head: cputs::@1 tails: cputs::@2 blocks: cputs::@2 cputs::@1 in scope cputc null depth in calling loop Loop head: cputs::@1 tails: cputs::@2 blocks: cputs::@2 cputs::@1 in scope cputc -null depth in calling loop Loop head: cscroll::@1 tails: cscroll::@5 blocks: cscroll::@5 cscroll::@3 cscroll::@1 cscroll::@8 cscroll::@7 cscroll::@4 in scope ppuDataSet -null depth in calling loop Loop head: cscroll::@3 tails: cscroll::@8 blocks: cscroll::@8 cscroll::@7 cscroll::@4 cscroll::@3 in scope ppuDataSet VARIABLE REGISTER WEIGHTS (byte) RICOH_2A03::DMC_FREQ @@ -2357,93 +3618,151 @@ VARIABLE REGISTER WEIGHTS (byte) SpriteData::x (byte) SpriteData::y (void()) clrscr() -(byte) conio_cursor_x loadstore 5189.185185185185 -(byte) conio_cursor_y loadstore 64002.159999999996 -(byte*) conio_line_text loadstore 45104.24489795918 +(byte) conio_cursor_x loadstore 4375315.90625 +(byte) conio_cursor_y loadstore 6.5306328755102046E7 +(byte*) conio_line_text loadstore 4.9111335755555555E7 (void()) cputc((byte) cputc::c) (byte) cputc::c -(byte) cputc::c#0 7001.0 +(byte) cputc::c#0 2000002.0 +(byte) cputc::c#1 2002.0 +(byte) cputc::c#2 7000334.666666666 +(void()) cputcxy((byte) cputcxy::x , (byte) cputcxy::y , (byte) cputcxy::c) +(byte) cputcxy::c +(byte) cputcxy::c#4 250.25 +(byte) cputcxy::x +(byte) cputcxy::x#0 202.0 +(byte) cputcxy::x#1 202.0 +(byte) cputcxy::x#4 1203.0 +(byte) cputcxy::y +(byte) cputcxy::y#2 202.0 +(byte) cputcxy::y#3 202.0 +(byte) cputcxy::y#4 601.5 (void()) cputln() (void()) cputs((to_nomodify byte*) cputs::s) (byte) cputs::c -(byte) cputs::c#1 1001.0 +(byte) cputs::c#1 1000001.0 (to_nomodify byte*) cputs::s -(to_nomodify byte*) cputs::s#0 500.5 -(to_nomodify byte*) cputs::s#2 1501.5 +(to_nomodify byte*) cputs::s#0 500000.5 +(to_nomodify byte*) cputs::s#2 1500001.5 +(void()) cputsxy((byte) cputsxy::x , (byte) cputsxy::y , (to_nomodify byte*) cputsxy::s) +(to_nomodify byte*) cputsxy::s +(byte) cputsxy::x +(byte) cputsxy::x#0 551.0 +(byte) cputsxy::y +(byte) cputsxy::y#0 551.0 (void()) cscroll() -(byte) cscroll::ch -(byte) cscroll::ch#0 6.666666673333334E8 (byte*) cscroll::line1 -(byte*) cscroll::line1#1 1.000000001E9 -(byte*) cscroll::line1#2 2.0000000036363637E8 -(byte*) cscroll::line1#6 1.00000001E8 +(byte*) cscroll::line1#1 6.666666666673334E11 +(byte*) cscroll::line1#2 3.333333333336667E11 (byte*) cscroll::line2 -(byte*) cscroll::line2#1 3.333333336666667E8 -(byte*) cscroll::line2#2 3.1428571485714287E8 -(byte*) cscroll::line2#6 1.00000001E8 -(byte) cscroll::x -(byte) cscroll::x#1 2.000000002E9 -(byte) cscroll::x#2 2.72727273E8 +(byte*) cscroll::line2#1 1.000000000001E12 +(byte*) cscroll::line2#2 2.857142857145714E11 (byte) cscroll::y -(byte) cscroll::y#1 2.00000002E8 -(byte) cscroll::y#2 2.142857164285714E7 +(byte) cscroll::y#1 2.000000000002E12 +(byte) cscroll::y#2 3.75000000000375E11 +(void()) gotoxy((byte) gotoxy::x , (byte) gotoxy::y) +(byte*~) gotoxy::$5 20002.0 +(word~) gotoxy::$6 20002.0 +(word) gotoxy::line_offset +(word) gotoxy::line_offset#0 20002.0 +(byte) gotoxy::x +(byte) gotoxy::x#2 1001.0 +(byte) gotoxy::x#3 1001.0 +(byte) gotoxy::x#4 3667.333333333333 +(byte) gotoxy::x#5 20002.0 +(byte) gotoxy::y +(byte) gotoxy::y#2 2002.0 +(byte) gotoxy::y#3 2002.0 +(byte) gotoxy::y#4 7334.666666666666 +(byte) gotoxy::y#5 3333.6666666666665 (void()) main() +(byte) main::i +(byte) main::i#1 202.0 +(byte) main::i#2 86.57142857142857 (byte) main::initNES1_i (byte) main::initNES1_i#1 151.5 (byte) main::initNES1_i#2 112.22222222222223 (byte~) main::initNES1_waitForVBlank1_$0 202.0 (byte~) main::initNES1_waitForVBlank2_$0 202.0 +(byte) main::screensizex1_return +(byte) main::screensizex2_return +(byte) main::screensizey1_return +(byte) main::screensizey2_return +(byte) main::screensizey3_return +(byte) main::x +(byte) main::x#1 202.0 +(byte) main::x#10 72.14285714285714 +(byte) main::y +(byte) main::y#1 202.0 +(byte) main::y#10 72.14285714285714 +(void()) ppuDataFetch((nomodify void*) ppuDataFetch::cpuData , (nomodify void*) ppuDataFetch::ppuData , (word) ppuDataFetch::size) +(nomodify void*) ppuDataFetch::cpuData +(byte*) ppuDataFetch::cpuDst +(byte*) ppuDataFetch::cpuDst#1 1.0E17 +(byte*) ppuDataFetch::cpuDst#2 7.5E16 +(word) ppuDataFetch::i +(word) ppuDataFetch::i#1 2.0E17 +(word) ppuDataFetch::i#2 6.0E16 +(nomodify void*) ppuDataFetch::ppuData +(nomodify void*) ppuDataFetch::ppuData#0 5.25000000000075E12 +(byte~) ppuDataFetch::ppuDataPrepare1_$0 2.0000000000002E13 +(byte~) ppuDataFetch::ppuDataPrepare1_$1 2.0000000000002E13 +(nomodify void*) ppuDataFetch::ppuDataPrepare1_ppuData +(byte) ppuDataFetch::ppuDataRead1_return +(byte) ppuDataFetch::ppuDataRead1_return#0 2.0E17 +(word) ppuDataFetch::size (void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) (word) ppuDataFill::i -(word) ppuDataFill::i#1 2.00000002E8 -(word) ppuDataFill::i#2 1.00000001E8 +(word) ppuDataFill::i#1 2.000000000002E12 +(word) ppuDataFill::i#2 1.000000000001E12 (nomodify void*) ppuDataFill::ppuData -(byte~) ppuDataFill::ppuDataPrepare1_$0 2.0000002E7 -(byte~) ppuDataFill::ppuDataPrepare1_$1 2.0000002E7 +(byte~) ppuDataFill::ppuDataPrepare1_$0 2.0000000002E10 +(byte~) ppuDataFill::ppuDataPrepare1_$1 2.0000000002E10 (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData -(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 6666667.333333333 +(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 6.666666667333333E9 (byte) ppuDataFill::ppuDataPut1_val (word) ppuDataFill::size -(word) ppuDataFill::size#5 1.1111111222222222E7 +(word) ppuDataFill::size#5 1.1111111111122223E11 (byte) ppuDataFill::val -(byte) ppuDataFill::val#10 1.1111111222222222E7 -(byte()) ppuDataGet((nomodify void*) ppuDataGet::ppuData) -(nomodify void*) ppuDataGet::ppuData -(nomodify void*) ppuDataGet::ppuData#0 5.25000000075E9 -(byte~) ppuDataGet::ppuDataPrepare1_$0 2.0000000002E10 -(byte~) ppuDataGet::ppuDataPrepare1_$1 2.0000000002E10 -(nomodify void*) ppuDataGet::ppuDataPrepare1_ppuData -(byte) ppuDataGet::ppuDataRead1_return -(byte) ppuDataGet::ppuDataRead1_return#0 3.666666667333333E9 -(byte) ppuDataGet::return -(byte) ppuDataGet::return#2 2.000000002E9 +(byte) ppuDataFill::val#10 1.1111111111122223E11 (void()) ppuDataSet((nomodify void*) ppuDataSet::ppuData , (byte) ppuDataSet::val) (nomodify void*) ppuDataSet::ppuData -(nomodify byte*) ppuDataSet::ppuData#0 5000.5 -(nomodify void*) ppuDataSet::ppuData#1 1.000000001E9 -(byte~) ppuDataSet::ppuDataPrepare1_$0 2.0000000002E10 -(byte~) ppuDataSet::ppuDataPrepare1_$1 2.0000000002E10 +(nomodify byte*) ppuDataSet::ppuData#0 2000000.2 +(byte~) ppuDataSet::ppuDataPrepare1_$0 2.00000002E8 +(byte~) ppuDataSet::ppuDataPrepare1_$1 2.00000002E8 (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData -(nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 7.000003334666666E9 -(nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#2 20002.0 (byte) ppuDataSet::ppuDataPut1_val (byte) ppuDataSet::val -(byte) ppuDataSet::val#0 10001.0 -(byte) ppuDataSet::val#1 2.000000002E9 -(byte) ppuDataSet::val#2 2.2000020006E9 +(byte) ppuDataSet::val#0 1.8333333666666668E7 (void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size) (nomodify void*) ppuDataTransfer::cpuData +(nomodify void*) ppuDataTransfer::cpuData#2 (byte*) ppuDataTransfer::cpuSrc -(byte*) ppuDataTransfer::cpuSrc#1 1001.0 -(byte*) ppuDataTransfer::cpuSrc#2 750.75 +(byte*) ppuDataTransfer::cpuSrc#1 1.000000000000001E15 +(byte*) ppuDataTransfer::cpuSrc#2 7.52500000000001E14 +(byte*) ppuDataTransfer::cpuSrc#6 2.0000000000002E13 (word) ppuDataTransfer::i -(word) ppuDataTransfer::i#1 2002.0 -(word) ppuDataTransfer::i#2 600.5999999999999 +(word) ppuDataTransfer::i#1 2.000000000000002E15 +(word) ppuDataTransfer::i#2 6.000000000000005E14 (nomodify void*) ppuDataTransfer::ppuData +(nomodify void*) ppuDataTransfer::ppuData#0 2.000000000002E12 +(byte~) ppuDataTransfer::ppuDataPrepare1_$0 2.0000000000002E13 +(byte~) ppuDataTransfer::ppuDataPrepare1_$1 2.0000000000002E13 (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData +(nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 7.000000000001E12 (byte) ppuDataTransfer::ppuDataPut1_val -(byte) ppuDataTransfer::ppuDataPut1_val#0 2002.0 +(byte) ppuDataTransfer::ppuDataPut1_val#0 2.000000000000002E15 (word) ppuDataTransfer::size +(word) ppuDataTransfer::size#3 8.333333333333342E13 +(byte) printf_buffer_number::sign +(byte) printf_format_number::justify_left +(byte) printf_format_number::min_length +(byte) printf_format_number::radix +(byte) printf_format_number::sign_always +(byte) printf_format_number::upper_case +(byte) printf_format_number::zero_padding +(byte) printf_format_string::justify_left +(byte) printf_format_string::min_length (byte()) readJoy1() (byte~) readJoy1::$1 101.0 (byte~) readJoy1::$2 202.0 @@ -2455,6 +3774,42 @@ VARIABLE REGISTER WEIGHTS (byte) readJoy1::joy#2 51.0 (byte) readJoy1::return (byte) readJoy1::return#2 4.0 +(void()) uctoa((byte) uctoa::value , (byte*) uctoa::buffer , (byte) uctoa::radix) +(byte*) uctoa::buffer +(byte*) uctoa::buffer#11 33500.49999999999 +(byte*) uctoa::buffer#14 150001.5 +(byte*) uctoa::buffer#3 2002.0 +(byte*) uctoa::buffer#4 200002.0 +(byte) uctoa::digit +(byte) uctoa::digit#1 200002.0 +(byte) uctoa::digit#2 30769.53846153846 +(byte) uctoa::digit_value +(byte) uctoa::digit_value#0 60000.600000000006 +(byte*) uctoa::digit_values +(byte) uctoa::max_digits +(byte) uctoa::radix +(byte) uctoa::started +(byte) uctoa::started#2 60000.600000000006 +(byte) uctoa::started#4 100001.0 +(byte) uctoa::value +(byte) uctoa::value#0 100001.0 +(byte) uctoa::value#1 551.0 +(byte) uctoa::value#2 67000.99999999999 +(byte) uctoa::value#6 150001.5 +(byte()) uctoa_append((byte*) uctoa_append::buffer , (byte) uctoa_append::value , (byte) uctoa_append::sub) +(byte*) uctoa_append::buffer +(byte*) uctoa_append::buffer#0 137500.25 +(byte) uctoa_append::digit +(byte) uctoa_append::digit#1 1.000000001E9 +(byte) uctoa_append::digit#2 1.0005000015E9 +(byte) uctoa_append::return +(byte) uctoa_append::return#0 200002.0 +(byte) uctoa_append::sub +(byte) uctoa_append::sub#0 3.333500005E8 +(byte) uctoa_append::value +(byte) uctoa_append::value#0 366667.3333333334 +(byte) uctoa_append::value#1 2.000000002E9 +(byte) uctoa_append::value#2 5.0018333416666675E8 interrupt(HARDWARE_STACK)(void()) vblank() (byte~) vblank::$1 4.0 (byte~) vblank::$3 4.0 @@ -2467,19 +3822,36 @@ interrupt(HARDWARE_STACK)(void()) vblank() Initial phi equivalence classes [ main::initNES1_i#2 main::initNES1_i#1 ] -[ cputs::s#2 cputs::s#0 ] +[ main::x#10 main::x#1 ] +[ main::y#10 main::y#1 ] +[ main::i#2 main::i#1 ] +[ cputcxy::x#4 cputcxy::x#0 cputcxy::x#1 ] +[ cputcxy::y#4 cputcxy::y#3 cputcxy::y#2 ] +[ cputcxy::c#4 ] +[ cputc::c#2 cputc::c#1 cputc::c#0 ] [ cscroll::y#2 cscroll::y#1 ] -[ cscroll::line2#6 cscroll::line2#2 cscroll::line2#1 ] -[ cscroll::line1#6 cscroll::line1#2 cscroll::line1#1 ] -[ cscroll::x#2 cscroll::x#1 ] -[ ppuDataSet::ppuDataPrepare1_ppuData#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ppuDataSet::ppuData#1 ] -[ ppuDataSet::val#2 ppuDataSet::val#0 ppuDataSet::val#1 ] +[ cscroll::line2#2 cscroll::line2#1 ] +[ cscroll::line1#2 cscroll::line1#1 ] +[ ppuDataTransfer::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuData#0 ] +[ ppuDataTransfer::cpuData#2 ] +[ ppuDataTransfer::size#3 ] +[ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] +[ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] +[ ppuDataFetch::i#2 ppuDataFetch::i#1 ] +[ ppuDataFetch::cpuDst#2 ppuDataFetch::cpuDst#1 ] [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] [ ppuDataFill::size#5 ] [ ppuDataFill::val#10 ] [ ppuDataFill::i#2 ppuDataFill::i#1 ] -[ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] -[ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#1 ] +[ gotoxy::y#5 gotoxy::y#4 gotoxy::y#2 gotoxy::y#3 ] +[ gotoxy::x#5 gotoxy::x#4 gotoxy::x#2 gotoxy::x#3 ] +[ cputs::s#2 cputs::s#0 ] +[ uctoa::digit#2 uctoa::digit#1 ] +[ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ] +[ uctoa::started#2 uctoa::started#4 ] +[ uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 ] +[ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ] +[ uctoa_append::digit#2 uctoa_append::digit#1 ] [ readJoy1::i#2 readJoy1::i#1 ] [ readJoy1::joy#2 readJoy1::joy#1 ] Added variable conio_cursor_x to live range equivalence class [ conio_cursor_x ] @@ -2489,20 +3861,30 @@ Added variable x_scroll to live range equivalence class [ x_scroll ] Added variable y_scroll to live range equivalence class [ y_scroll ] Added variable main::initNES1_waitForVBlank1_$0 to live range equivalence class [ main::initNES1_waitForVBlank1_$0 ] Added variable main::initNES1_waitForVBlank2_$0 to live range equivalence class [ main::initNES1_waitForVBlank2_$0 ] -Added variable cputs::c#1 to live range equivalence class [ cputs::c#1 ] -Added variable cputc::c#0 to live range equivalence class [ cputc::c#0 ] +Added variable cputsxy::x#0 to live range equivalence class [ cputsxy::x#0 ] +Added variable cputsxy::y#0 to live range equivalence class [ cputsxy::y#0 ] Added variable ppuDataSet::ppuData#0 to live range equivalence class [ ppuDataSet::ppuData#0 ] -Added variable ppuDataGet::ppuData#0 to live range equivalence class [ ppuDataGet::ppuData#0 ] -Added variable ppuDataGet::return#2 to live range equivalence class [ ppuDataGet::return#2 ] -Added variable cscroll::ch#0 to live range equivalence class [ cscroll::ch#0 ] -Added variable ppuDataSet::ppuDataPrepare1_$0 to live range equivalence class [ ppuDataSet::ppuDataPrepare1_$0 ] -Added variable ppuDataSet::ppuDataPrepare1_$1 to live range equivalence class [ ppuDataSet::ppuDataPrepare1_$1 ] -Added variable ppuDataGet::ppuDataPrepare1_$0 to live range equivalence class [ ppuDataGet::ppuDataPrepare1_$0 ] -Added variable ppuDataGet::ppuDataPrepare1_$1 to live range equivalence class [ ppuDataGet::ppuDataPrepare1_$1 ] -Added variable ppuDataGet::ppuDataRead1_return#0 to live range equivalence class [ ppuDataGet::ppuDataRead1_return#0 ] +Added variable ppuDataSet::val#0 to live range equivalence class [ ppuDataSet::val#0 ] +Added variable ppuDataFetch::ppuData#0 to live range equivalence class [ ppuDataFetch::ppuData#0 ] +Added variable ppuDataTransfer::ppuDataPrepare1_$0 to live range equivalence class [ ppuDataTransfer::ppuDataPrepare1_$0 ] +Added variable ppuDataTransfer::ppuDataPrepare1_$1 to live range equivalence class [ ppuDataTransfer::ppuDataPrepare1_$1 ] +Added variable ppuDataTransfer::ppuDataPut1_val#0 to live range equivalence class [ ppuDataTransfer::ppuDataPut1_val#0 ] +Added variable ppuDataFetch::ppuDataPrepare1_$0 to live range equivalence class [ ppuDataFetch::ppuDataPrepare1_$0 ] +Added variable ppuDataFetch::ppuDataPrepare1_$1 to live range equivalence class [ ppuDataFetch::ppuDataPrepare1_$1 ] +Added variable ppuDataFetch::ppuDataRead1_return#0 to live range equivalence class [ ppuDataFetch::ppuDataRead1_return#0 ] Added variable ppuDataFill::ppuDataPrepare1_$0 to live range equivalence class [ ppuDataFill::ppuDataPrepare1_$0 ] Added variable ppuDataFill::ppuDataPrepare1_$1 to live range equivalence class [ ppuDataFill::ppuDataPrepare1_$1 ] -Added variable ppuDataTransfer::ppuDataPut1_val#0 to live range equivalence class [ ppuDataTransfer::ppuDataPut1_val#0 ] +Added variable ppuDataSet::ppuDataPrepare1_$0 to live range equivalence class [ ppuDataSet::ppuDataPrepare1_$0 ] +Added variable ppuDataSet::ppuDataPrepare1_$1 to live range equivalence class [ ppuDataSet::ppuDataPrepare1_$1 ] +Added variable gotoxy::$6 to live range equivalence class [ gotoxy::$6 ] +Added variable gotoxy::line_offset#0 to live range equivalence class [ gotoxy::line_offset#0 ] +Added variable gotoxy::$5 to live range equivalence class [ gotoxy::$5 ] +Added variable cputs::c#1 to live range equivalence class [ cputs::c#1 ] +Added variable uctoa::buffer#3 to live range equivalence class [ uctoa::buffer#3 ] +Added variable uctoa::digit_value#0 to live range equivalence class [ uctoa::digit_value#0 ] +Added variable uctoa_append::buffer#0 to live range equivalence class [ uctoa_append::buffer#0 ] +Added variable uctoa_append::sub#0 to live range equivalence class [ uctoa_append::sub#0 ] +Added variable uctoa_append::return#0 to live range equivalence class [ uctoa_append::return#0 ] Added variable readJoy1::return#2 to live range equivalence class [ readJoy1::return#2 ] Added variable vblank::joy#0 to live range equivalence class [ vblank::joy#0 ] Added variable vblank::$1 to live range equivalence class [ vblank::$1 ] @@ -2513,19 +3895,36 @@ Added variable readJoy1::$1 to live range equivalence class [ readJoy1::$1 ] Added variable readJoy1::$2 to live range equivalence class [ readJoy1::$2 ] Complete equivalence classes [ main::initNES1_i#2 main::initNES1_i#1 ] -[ cputs::s#2 cputs::s#0 ] +[ main::x#10 main::x#1 ] +[ main::y#10 main::y#1 ] +[ main::i#2 main::i#1 ] +[ cputcxy::x#4 cputcxy::x#0 cputcxy::x#1 ] +[ cputcxy::y#4 cputcxy::y#3 cputcxy::y#2 ] +[ cputcxy::c#4 ] +[ cputc::c#2 cputc::c#1 cputc::c#0 ] [ cscroll::y#2 cscroll::y#1 ] -[ cscroll::line2#6 cscroll::line2#2 cscroll::line2#1 ] -[ cscroll::line1#6 cscroll::line1#2 cscroll::line1#1 ] -[ cscroll::x#2 cscroll::x#1 ] -[ ppuDataSet::ppuDataPrepare1_ppuData#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ppuDataSet::ppuData#1 ] -[ ppuDataSet::val#2 ppuDataSet::val#0 ppuDataSet::val#1 ] +[ cscroll::line2#2 cscroll::line2#1 ] +[ cscroll::line1#2 cscroll::line1#1 ] +[ ppuDataTransfer::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuData#0 ] +[ ppuDataTransfer::cpuData#2 ] +[ ppuDataTransfer::size#3 ] +[ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] +[ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] +[ ppuDataFetch::i#2 ppuDataFetch::i#1 ] +[ ppuDataFetch::cpuDst#2 ppuDataFetch::cpuDst#1 ] [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] [ ppuDataFill::size#5 ] [ ppuDataFill::val#10 ] [ ppuDataFill::i#2 ppuDataFill::i#1 ] -[ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] -[ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#1 ] +[ gotoxy::y#5 gotoxy::y#4 gotoxy::y#2 gotoxy::y#3 ] +[ gotoxy::x#5 gotoxy::x#4 gotoxy::x#2 gotoxy::x#3 ] +[ cputs::s#2 cputs::s#0 ] +[ uctoa::digit#2 uctoa::digit#1 ] +[ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ] +[ uctoa::started#2 uctoa::started#4 ] +[ uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 ] +[ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ] +[ uctoa_append::digit#2 uctoa_append::digit#1 ] [ readJoy1::i#2 readJoy1::i#1 ] [ readJoy1::joy#2 readJoy1::joy#1 ] [ conio_cursor_x ] @@ -2535,20 +3934,30 @@ Complete equivalence classes [ y_scroll ] [ main::initNES1_waitForVBlank1_$0 ] [ main::initNES1_waitForVBlank2_$0 ] -[ cputs::c#1 ] -[ cputc::c#0 ] +[ cputsxy::x#0 ] +[ cputsxy::y#0 ] [ ppuDataSet::ppuData#0 ] -[ ppuDataGet::ppuData#0 ] -[ ppuDataGet::return#2 ] -[ cscroll::ch#0 ] -[ ppuDataSet::ppuDataPrepare1_$0 ] -[ ppuDataSet::ppuDataPrepare1_$1 ] -[ ppuDataGet::ppuDataPrepare1_$0 ] -[ ppuDataGet::ppuDataPrepare1_$1 ] -[ ppuDataGet::ppuDataRead1_return#0 ] +[ ppuDataSet::val#0 ] +[ ppuDataFetch::ppuData#0 ] +[ ppuDataTransfer::ppuDataPrepare1_$0 ] +[ ppuDataTransfer::ppuDataPrepare1_$1 ] +[ ppuDataTransfer::ppuDataPut1_val#0 ] +[ ppuDataFetch::ppuDataPrepare1_$0 ] +[ ppuDataFetch::ppuDataPrepare1_$1 ] +[ ppuDataFetch::ppuDataRead1_return#0 ] [ ppuDataFill::ppuDataPrepare1_$0 ] [ ppuDataFill::ppuDataPrepare1_$1 ] -[ ppuDataTransfer::ppuDataPut1_val#0 ] +[ ppuDataSet::ppuDataPrepare1_$0 ] +[ ppuDataSet::ppuDataPrepare1_$1 ] +[ gotoxy::$6 ] +[ gotoxy::line_offset#0 ] +[ gotoxy::$5 ] +[ cputs::c#1 ] +[ uctoa::buffer#3 ] +[ uctoa::digit_value#0 ] +[ uctoa_append::buffer#0 ] +[ uctoa_append::sub#0 ] +[ uctoa_append::return#0 ] [ readJoy1::return#2 ] [ vblank::joy#0 ] [ vblank::$1 ] @@ -2558,50 +3967,77 @@ Complete equivalence classes [ readJoy1::$1 ] [ readJoy1::$2 ] Allocated zp[1]:2 [ main::initNES1_i#2 main::initNES1_i#1 ] -Allocated zp[2]:3 [ cputs::s#2 cputs::s#0 ] -Allocated zp[1]:5 [ cscroll::y#2 cscroll::y#1 ] -Allocated zp[2]:6 [ cscroll::line2#6 cscroll::line2#2 cscroll::line2#1 ] -Allocated zp[2]:8 [ cscroll::line1#6 cscroll::line1#2 cscroll::line1#1 ] -Allocated zp[1]:10 [ cscroll::x#2 cscroll::x#1 ] -Allocated zp[2]:11 [ ppuDataSet::ppuDataPrepare1_ppuData#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ppuDataSet::ppuData#1 ] -Allocated zp[1]:13 [ ppuDataSet::val#2 ppuDataSet::val#0 ppuDataSet::val#1 ] -Allocated zp[2]:14 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] -Allocated zp[2]:16 [ ppuDataFill::size#5 ] -Allocated zp[1]:18 [ ppuDataFill::val#10 ] -Allocated zp[2]:19 [ ppuDataFill::i#2 ppuDataFill::i#1 ] +Allocated zp[1]:3 [ main::x#10 main::x#1 ] +Allocated zp[1]:4 [ main::y#10 main::y#1 ] +Allocated zp[1]:5 [ main::i#2 main::i#1 ] +Allocated zp[1]:6 [ cputcxy::x#4 cputcxy::x#0 cputcxy::x#1 ] +Allocated zp[1]:7 [ cputcxy::y#4 cputcxy::y#3 cputcxy::y#2 ] +Allocated zp[1]:8 [ cputcxy::c#4 ] +Allocated zp[1]:9 [ cputc::c#2 cputc::c#1 cputc::c#0 ] +Allocated zp[1]:10 [ cscroll::y#2 cscroll::y#1 ] +Allocated zp[2]:11 [ cscroll::line2#2 cscroll::line2#1 ] +Allocated zp[2]:13 [ cscroll::line1#2 cscroll::line1#1 ] +Allocated zp[2]:15 [ ppuDataTransfer::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuData#0 ] +Allocated zp[2]:17 [ ppuDataTransfer::cpuData#2 ] +Allocated zp[2]:19 [ ppuDataTransfer::size#3 ] Allocated zp[2]:21 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] -Allocated zp[2]:23 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#1 ] -Allocated zp[1]:25 [ readJoy1::i#2 readJoy1::i#1 ] -Allocated zp[1]:26 [ readJoy1::joy#2 readJoy1::joy#1 ] -Allocated zp[1]:27 [ conio_cursor_x ] -Allocated zp[1]:28 [ conio_cursor_y ] -Allocated zp[2]:29 [ conio_line_text ] -Allocated zp[1]:31 [ x_scroll ] -Allocated zp[1]:32 [ y_scroll ] -Allocated zp[1]:33 [ main::initNES1_waitForVBlank1_$0 ] -Allocated zp[1]:34 [ main::initNES1_waitForVBlank2_$0 ] -Allocated zp[1]:35 [ cputs::c#1 ] -Allocated zp[1]:36 [ cputc::c#0 ] -Allocated zp[2]:37 [ ppuDataSet::ppuData#0 ] -Allocated zp[2]:39 [ ppuDataGet::ppuData#0 ] -Allocated zp[1]:41 [ ppuDataGet::return#2 ] -Allocated zp[1]:42 [ cscroll::ch#0 ] -Allocated zp[1]:43 [ ppuDataSet::ppuDataPrepare1_$0 ] -Allocated zp[1]:44 [ ppuDataSet::ppuDataPrepare1_$1 ] -Allocated zp[1]:45 [ ppuDataGet::ppuDataPrepare1_$0 ] -Allocated zp[1]:46 [ ppuDataGet::ppuDataPrepare1_$1 ] -Allocated zp[1]:47 [ ppuDataGet::ppuDataRead1_return#0 ] -Allocated zp[1]:48 [ ppuDataFill::ppuDataPrepare1_$0 ] -Allocated zp[1]:49 [ ppuDataFill::ppuDataPrepare1_$1 ] -Allocated zp[1]:50 [ ppuDataTransfer::ppuDataPut1_val#0 ] -Allocated zp[1]:51 [ readJoy1::return#2 ] -Allocated zp[1]:52 [ vblank::joy#0 ] -Allocated zp[1]:53 [ vblank::$1 ] -Allocated zp[1]:54 [ vblank::$3 ] -Allocated zp[1]:55 [ vblank::$5 ] -Allocated zp[1]:56 [ vblank::$7 ] -Allocated zp[1]:57 [ readJoy1::$1 ] -Allocated zp[1]:58 [ readJoy1::$2 ] +Allocated zp[2]:23 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] +Allocated zp[2]:25 [ ppuDataFetch::i#2 ppuDataFetch::i#1 ] +Allocated zp[2]:27 [ ppuDataFetch::cpuDst#2 ppuDataFetch::cpuDst#1 ] +Allocated zp[2]:29 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] +Allocated zp[2]:31 [ ppuDataFill::size#5 ] +Allocated zp[1]:33 [ ppuDataFill::val#10 ] +Allocated zp[2]:34 [ ppuDataFill::i#2 ppuDataFill::i#1 ] +Allocated zp[1]:36 [ gotoxy::y#5 gotoxy::y#4 gotoxy::y#2 gotoxy::y#3 ] +Allocated zp[1]:37 [ gotoxy::x#5 gotoxy::x#4 gotoxy::x#2 gotoxy::x#3 ] +Allocated zp[2]:38 [ cputs::s#2 cputs::s#0 ] +Allocated zp[1]:40 [ uctoa::digit#2 uctoa::digit#1 ] +Allocated zp[1]:41 [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ] +Allocated zp[1]:42 [ uctoa::started#2 uctoa::started#4 ] +Allocated zp[2]:43 [ uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 ] +Allocated zp[1]:45 [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ] +Allocated zp[1]:46 [ uctoa_append::digit#2 uctoa_append::digit#1 ] +Allocated zp[1]:47 [ readJoy1::i#2 readJoy1::i#1 ] +Allocated zp[1]:48 [ readJoy1::joy#2 readJoy1::joy#1 ] +Allocated zp[1]:49 [ conio_cursor_x ] +Allocated zp[1]:50 [ conio_cursor_y ] +Allocated zp[2]:51 [ conio_line_text ] +Allocated zp[1]:53 [ x_scroll ] +Allocated zp[1]:54 [ y_scroll ] +Allocated zp[1]:55 [ main::initNES1_waitForVBlank1_$0 ] +Allocated zp[1]:56 [ main::initNES1_waitForVBlank2_$0 ] +Allocated zp[1]:57 [ cputsxy::x#0 ] +Allocated zp[1]:58 [ cputsxy::y#0 ] +Allocated zp[2]:59 [ ppuDataSet::ppuData#0 ] +Allocated zp[1]:61 [ ppuDataSet::val#0 ] +Allocated zp[2]:62 [ ppuDataFetch::ppuData#0 ] +Allocated zp[1]:64 [ ppuDataTransfer::ppuDataPrepare1_$0 ] +Allocated zp[1]:65 [ ppuDataTransfer::ppuDataPrepare1_$1 ] +Allocated zp[1]:66 [ ppuDataTransfer::ppuDataPut1_val#0 ] +Allocated zp[1]:67 [ ppuDataFetch::ppuDataPrepare1_$0 ] +Allocated zp[1]:68 [ ppuDataFetch::ppuDataPrepare1_$1 ] +Allocated zp[1]:69 [ ppuDataFetch::ppuDataRead1_return#0 ] +Allocated zp[1]:70 [ ppuDataFill::ppuDataPrepare1_$0 ] +Allocated zp[1]:71 [ ppuDataFill::ppuDataPrepare1_$1 ] +Allocated zp[1]:72 [ ppuDataSet::ppuDataPrepare1_$0 ] +Allocated zp[1]:73 [ ppuDataSet::ppuDataPrepare1_$1 ] +Allocated zp[2]:74 [ gotoxy::$6 ] +Allocated zp[2]:76 [ gotoxy::line_offset#0 ] +Allocated zp[2]:78 [ gotoxy::$5 ] +Allocated zp[1]:80 [ cputs::c#1 ] +Allocated zp[2]:81 [ uctoa::buffer#3 ] +Allocated zp[1]:83 [ uctoa::digit_value#0 ] +Allocated zp[2]:84 [ uctoa_append::buffer#0 ] +Allocated zp[1]:86 [ uctoa_append::sub#0 ] +Allocated zp[1]:87 [ uctoa_append::return#0 ] +Allocated zp[1]:88 [ readJoy1::return#2 ] +Allocated zp[1]:89 [ vblank::joy#0 ] +Allocated zp[1]:90 [ vblank::$1 ] +Allocated zp[1]:91 [ vblank::$3 ] +Allocated zp[1]:92 [ vblank::$5 ] +Allocated zp[1]:93 [ vblank::$7 ] +Allocated zp[1]:94 [ readJoy1::$1 ] +Allocated zp[1]:95 [ readJoy1::$2 ] INITIAL ASM Target platform is nes / MOS6502 @@ -2672,6 +4108,10 @@ Target platform is nes / MOS6502 // $3000-$3eff $0f00 Mirrors of $2000-$2eff // $3f00-$3f1f $0020 Palette RAM indexes .label PPU_PALETTE = $3f00 + // PPU Status Register for reading in ASM + .label PPU_PPUSTATUS = $2002 + // PPU Data Register for reading in ASM + .label PPU_PPUDATA = $2007 // APU Frame Counter // generates low-frequency clocks for the channels and an optional 60 Hz interrupt. // https://wiki.nesdev.com/w/index.php/APU_Frame_Counter @@ -2686,17 +4126,15 @@ Target platform is nes / MOS6502 .label FR_COUNTER = $4017 // Pointer to the start of RAM memory .label MEMORY = 0 - // PPU Status Register for reading in ASM - .label PPU_PPUSTATUS = $2002 // NES Picture Processing Unit (PPU) .label PPU = $2000 // NES CPU and audion processing unit (APU) .label APU = $4000 - .label conio_cursor_x = $1b - .label conio_cursor_y = $1c - .label conio_line_text = $1d - .label x_scroll = $1f - .label y_scroll = $20 + .label conio_cursor_x = $31 + .label conio_cursor_y = $32 + .label conio_line_text = $33 + .label x_scroll = $35 + .label y_scroll = $36 // @begin __bbegin: jmp __b1 @@ -2743,9 +4181,17 @@ __bend: // main // RESET Called when the NES is reset, including when it is turned on. main: { - .label initNES1_waitForVBlank1___0 = $21 - .label initNES1_waitForVBlank2___0 = $22 + .const screensizex1_return = $20 + .const screensizey1_return = $1e + .const screensizey2_return = $1e + .const screensizex2_return = $20 + .const screensizey3_return = $1e + .label initNES1_waitForVBlank1___0 = $37 + .label initNES1_waitForVBlank2___0 = $38 .label initNES1_i = 2 + .label x = 3 + .label y = 4 + .label i = 5 jmp initNES1 // main::initNES1 initNES1: @@ -2863,171 +4309,333 @@ main: { initNES1___b7: // asm { ldaPPU_PPUSTATUS } lda PPU_PPUSTATUS - // [34] phi from main::initNES1_@7 to main::@2 [phi:main::initNES1_@7->main::@2] - __b2_from_initNES1___b7: - jmp __b2 - // main::@2 - __b2: + // [34] phi from main::initNES1_@7 to main::@6 [phi:main::initNES1_@7->main::@6] + __b6_from_initNES1___b7: + jmp __b6 + // main::@6 + __b6: // [35] call ppuDataTransfer // Transfer the palette - // [125] phi from main::@2 to ppuDataTransfer [phi:main::@2->ppuDataTransfer] - ppuDataTransfer_from___b2: + // [110] phi from main::@6 to ppuDataTransfer [phi:main::@6->ppuDataTransfer] + ppuDataTransfer_from___b6: + // [110] phi (word) ppuDataTransfer::size#3 = (byte) $20*(const byte) SIZEOF_BYTE [phi:main::@6->ppuDataTransfer#0] -- vwuz1=vbuc1 + lda #<$20*SIZEOF_BYTE + sta.z ppuDataTransfer.size + lda #>$20*SIZEOF_BYTE + sta.z ppuDataTransfer.size+1 + // [110] phi (nomodify void*) ppuDataTransfer::cpuData#2 = (void*)(const byte*) PALETTE [phi:main::@6->ppuDataTransfer#1] -- pvoz1=pvoc1 + lda #PALETTE + sta.z ppuDataTransfer.cpuData+1 + // [110] phi (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_PALETTE [phi:main::@6->ppuDataTransfer#2] -- pvoz1=pvoc1 + lda #PPU_PALETTE + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData+1 jsr ppuDataTransfer - // [36] phi from main::@2 to main::@3 [phi:main::@2->main::@3] - __b3_from___b2: - jmp __b3 - // main::@3 - __b3: + // [36] phi from main::@6 to main::@12 [phi:main::@6->main::@12] + __b12_from___b6: + jmp __b12 + // main::@12 + __b12: // [37] call ppuDataFill // Fill the PPU attribute table - // [109] phi from main::@3 to ppuDataFill [phi:main::@3->ppuDataFill] - ppuDataFill_from___b3: - // [109] phi (byte) ppuDataFill::val#10 = (byte) 0 [phi:main::@3->ppuDataFill#0] -- vbuz1=vbuc1 + // [136] phi from main::@12 to ppuDataFill [phi:main::@12->ppuDataFill] + ppuDataFill_from___b12: + // [136] phi (byte) ppuDataFill::val#10 = (byte) 0 [phi:main::@12->ppuDataFill#0] -- vbuz1=vbuc1 lda #0 sta.z ppuDataFill.val - // [109] phi (word) ppuDataFill::size#5 = (byte) $40 [phi:main::@3->ppuDataFill#1] -- vwuz1=vbuc1 + // [136] phi (word) ppuDataFill::size#5 = (byte) $40 [phi:main::@12->ppuDataFill#1] -- vwuz1=vbuc1 lda #<$40 sta.z ppuDataFill.size lda #>$40 sta.z ppuDataFill.size+1 - // [109] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 [phi:main::@3->ppuDataFill#2] -- pvoz1=pvoc1 + // [136] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 [phi:main::@12->ppuDataFill#2] -- pvoz1=pvoc1 lda #PPU_ATTRIBUTE_TABLE_0 sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 jsr ppuDataFill - // [38] phi from main::@3 to main::@4 [phi:main::@3->main::@4] - __b4_from___b3: - jmp __b4 - // main::@4 - __b4: + // [38] phi from main::@12 to main::@13 [phi:main::@12->main::@13] + __b13_from___b12: + jmp __b13 + // main::@13 + __b13: // [39] call ppuDataFill - // [109] phi from main::@4 to ppuDataFill [phi:main::@4->ppuDataFill] - ppuDataFill_from___b4: - // [109] phi (byte) ppuDataFill::val#10 = (byte) 0 [phi:main::@4->ppuDataFill#0] -- vbuz1=vbuc1 + // [136] phi from main::@13 to ppuDataFill [phi:main::@13->ppuDataFill] + ppuDataFill_from___b13: + // [136] phi (byte) ppuDataFill::val#10 = (byte) 0 [phi:main::@13->ppuDataFill#0] -- vbuz1=vbuc1 lda #0 sta.z ppuDataFill.val - // [109] phi (word) ppuDataFill::size#5 = (byte) $40 [phi:main::@4->ppuDataFill#1] -- vwuz1=vbuc1 + // [136] phi (word) ppuDataFill::size#5 = (byte) $40 [phi:main::@13->ppuDataFill#1] -- vwuz1=vbuc1 lda #<$40 sta.z ppuDataFill.size lda #>$40 sta.z ppuDataFill.size+1 - // [109] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_1 [phi:main::@4->ppuDataFill#2] -- pvoz1=pvoc1 + // [136] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_1 [phi:main::@13->ppuDataFill#2] -- pvoz1=pvoc1 lda #PPU_ATTRIBUTE_TABLE_1 sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 jsr ppuDataFill - // [40] phi from main::@4 to main::@5 [phi:main::@4->main::@5] - __b5_from___b4: - jmp __b5 - // main::@5 - __b5: + // [40] phi from main::@13 to main::@14 [phi:main::@13->main::@14] + __b14_from___b13: + jmp __b14 + // main::@14 + __b14: // [41] call clrscr // Print a string - // [119] phi from main::@5 to clrscr [phi:main::@5->clrscr] - clrscr_from___b5: + // [207] phi from main::@14 to clrscr [phi:main::@14->clrscr] + clrscr_from___b14: jsr clrscr - // [42] phi from main::@5 to main::@6 [phi:main::@5->main::@6] - __b6_from___b5: - jmp __b6 - // main::@6 - __b6: - // [43] call cputs - // [49] phi from main::@6 to cputs [phi:main::@6->cputs] - cputs_from___b6: - jsr cputs + // [42] phi from main::@14 to main::screensizex1 [phi:main::@14->main::screensizex1] + screensizex1_from___b14: + // [42] phi (byte) main::x#10 = (byte) 1 [phi:main::@14->main::screensizex1#0] -- vbuz1=vbuc1 + lda #1 + sta.z x + jmp screensizex1 + // main::screensizex1 + screensizex1: jmp __b7 // main::@7 __b7: - // [44] (volatile byte) x_scroll ← (byte) 0 -- vbuz1=vbuc1 + // [43] if((byte) main::x#10<(const byte) main::screensizex1_return#0-(byte) 1) goto main::@1 -- vbuz1_lt_vbuc1_then_la1 + lda.z x + cmp #screensizex1_return-1 + bcc __b1 + // [44] phi from main::@7 to main::screensizey2 [phi:main::@7->main::screensizey2] + screensizey2_from___b7: + // [44] phi (byte) main::y#10 = (byte) 1 [phi:main::@7->main::screensizey2#0] -- vbuz1=vbuc1 + lda #1 + sta.z y + jmp screensizey2 + // main::screensizey2 + screensizey2: + jmp __b9 + // main::@9 + __b9: + // [45] if((byte) main::y#10<(const byte) main::screensizey2_return#0-(byte) 3) goto main::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z y + cmp #screensizey2_return-3 + bcc __b2 + // [46] phi from main::@9 to main::screensizey3 [phi:main::@9->main::screensizey3] + screensizey3_from___b9: + // [46] phi (byte) main::i#2 = (byte) 0 [phi:main::@9->main::screensizey3#0] -- vbuz1=vbuc1 + lda #0 + sta.z i + jmp screensizey3 + // main::screensizey3 + screensizey3: + jmp __b11 + // main::@11 + __b11: + // [47] if((byte) main::i#2<(const byte) main::screensizey3_return#0) goto main::@3 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #screensizey3_return + bcc __b3 + jmp __b4 + // main::@4 + __b4: + // [48] (volatile byte) x_scroll ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta.z x_scroll - // [45] (volatile byte) y_scroll ← (byte) -8 -- vbuz1=vbuc1 + // [49] (volatile byte) y_scroll ← (byte) -8 -- vbuz1=vbuc1 lda #-8 sta.z y_scroll jmp enableVideoOutput1 // main::enableVideoOutput1 enableVideoOutput1: - // [46] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 -- _deref_pbuc1=vbuc2 + // [50] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 -- _deref_pbuc1=vbuc2 lda #$80 sta PPU - // [47] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e -- _deref_pbuc1=vbuc2 + // [51] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e -- _deref_pbuc1=vbuc2 lda #$1e sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK - // [48] phi from main::@1 main::enableVideoOutput1 to main::@1 [phi:main::@1/main::enableVideoOutput1->main::@1] - __b1_from___b1: - __b1_from_enableVideoOutput1: - jmp __b1 + // [52] phi from main::@5 main::enableVideoOutput1 to main::@5 [phi:main::@5/main::enableVideoOutput1->main::@5] + __b5_from___b5: + __b5_from_enableVideoOutput1: + jmp __b5 // Infinite loop + // main::@5 + __b5: + jmp __b5_from___b5 + // main::@3 + __b3: + // [53] (byte) uctoa::value#1 ← (byte) main::i#2 & (byte) $f -- vbuz1=vbuz2_band_vbuc1 + lda #$f + and.z i + sta.z uctoa.value + // [54] call uctoa + // [181] phi from main::@3 to uctoa [phi:main::@3->uctoa] + uctoa_from___b3: + jsr uctoa + jmp __b17 + // main::@17 + __b17: + // [55] (byte) cputsxy::x#0 ← (byte) main::i#2 -- vbuz1=vbuz2 + lda.z i + sta.z cputsxy.x + // [56] (byte) cputsxy::y#0 ← (byte) main::i#2 -- vbuz1=vbuz2 + lda.z i + sta.z cputsxy.y + // [57] call cputsxy + jsr cputsxy + jmp __b18 + // main::@18 + __b18: + // [58] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + inc.z i + // [46] phi from main::@18 to main::screensizey3 [phi:main::@18->main::screensizey3] + screensizey3_from___b18: + // [46] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@18->main::screensizey3#0] -- register_copy + jmp screensizey3 + // main::@2 + __b2: + // [59] (byte) cputcxy::y#2 ← (byte) main::y#10 -- vbuz1=vbuz2 + lda.z y + sta.z cputcxy.y + // [60] call cputcxy + // [71] phi from main::@2 to cputcxy [phi:main::@2->cputcxy] + cputcxy_from___b2: + // [71] phi (byte) cputcxy::c#4 = (byte) 'i' [phi:main::@2->cputcxy#0] -- vbuz1=vbuc1 + lda #'i' + sta.z cputcxy.c + // [71] phi (byte) cputcxy::y#4 = (byte) cputcxy::y#2 [phi:main::@2->cputcxy#1] -- register_copy + // [71] phi (byte) cputcxy::x#4 = (byte) 1 [phi:main::@2->cputcxy#2] -- vbuz1=vbuc1 + lda #1 + sta.z cputcxy.x + jsr cputcxy + // [61] phi from main::@2 to main::screensizex2 [phi:main::@2->main::screensizex2] + screensizex2_from___b2: + jmp screensizex2 + // main::screensizex2 + screensizex2: + jmp __b10 + // main::@10 + __b10: + // [62] (byte) cputcxy::y#3 ← (byte) main::y#10 -- vbuz1=vbuz2 + lda.z y + sta.z cputcxy.y + // [63] call cputcxy + // [71] phi from main::@10 to cputcxy [phi:main::@10->cputcxy] + cputcxy_from___b10: + // [71] phi (byte) cputcxy::c#4 = (byte) 'i' [phi:main::@10->cputcxy#0] -- vbuz1=vbuc1 + lda #'i' + sta.z cputcxy.c + // [71] phi (byte) cputcxy::y#4 = (byte) cputcxy::y#3 [phi:main::@10->cputcxy#1] -- register_copy + // [71] phi (byte) cputcxy::x#4 = (const byte) main::screensizex2_return#0-(byte) 2 [phi:main::@10->cputcxy#2] -- vbuz1=vbuc1 + lda #screensizex2_return-2 + sta.z cputcxy.x + jsr cputcxy + jmp __b16 + // main::@16 + __b16: + // [64] (byte) main::y#1 ← ++ (byte) main::y#10 -- vbuz1=_inc_vbuz1 + inc.z y + // [44] phi from main::@16 to main::screensizey2 [phi:main::@16->main::screensizey2] + screensizey2_from___b16: + // [44] phi (byte) main::y#10 = (byte) main::y#1 [phi:main::@16->main::screensizey2#0] -- register_copy + jmp screensizey2 // main::@1 __b1: - jmp __b1_from___b1 - .segment Data - s: .text @"hello world!\ni am nes\n look at me \n\n" - .byte 0 + // [65] (byte) cputcxy::x#0 ← (byte) main::x#10 -- vbuz1=vbuz2 + lda.z x + sta.z cputcxy.x + // [66] call cputcxy + // [71] phi from main::@1 to cputcxy [phi:main::@1->cputcxy] + cputcxy_from___b1: + // [71] phi (byte) cputcxy::c#4 = (byte) '-' [phi:main::@1->cputcxy#0] -- vbuz1=vbuc1 + lda #'-' + sta.z cputcxy.c + // [71] phi (byte) cputcxy::y#4 = (byte) 1 [phi:main::@1->cputcxy#1] -- vbuz1=vbuc1 + lda #1 + sta.z cputcxy.y + // [71] phi (byte) cputcxy::x#4 = (byte) cputcxy::x#0 [phi:main::@1->cputcxy#2] -- register_copy + jsr cputcxy + // [67] phi from main::@1 to main::screensizey1 [phi:main::@1->main::screensizey1] + screensizey1_from___b1: + jmp screensizey1 + // main::screensizey1 + screensizey1: + jmp __b8 + // main::@8 + __b8: + // [68] (byte) cputcxy::x#1 ← (byte) main::x#10 -- vbuz1=vbuz2 + lda.z x + sta.z cputcxy.x + // [69] call cputcxy + // [71] phi from main::@8 to cputcxy [phi:main::@8->cputcxy] + cputcxy_from___b8: + // [71] phi (byte) cputcxy::c#4 = (byte) '-' [phi:main::@8->cputcxy#0] -- vbuz1=vbuc1 + lda #'-' + sta.z cputcxy.c + // [71] phi (byte) cputcxy::y#4 = (const byte) main::screensizey1_return#0-(byte) 4 [phi:main::@8->cputcxy#1] -- vbuz1=vbuc1 + lda #screensizey1_return-4 + sta.z cputcxy.y + // [71] phi (byte) cputcxy::x#4 = (byte) cputcxy::x#1 [phi:main::@8->cputcxy#2] -- register_copy + jsr cputcxy + jmp __b15 + // main::@15 + __b15: + // [70] (byte) main::x#1 ← ++ (byte) main::x#10 -- vbuz1=_inc_vbuz1 + inc.z x + // [42] phi from main::@15 to main::screensizex1 [phi:main::@15->main::screensizex1] + screensizex1_from___b15: + // [42] phi (byte) main::x#10 = (byte) main::x#1 [phi:main::@15->main::screensizex1#0] -- register_copy + jmp screensizex1 } -.segment Code - // cputs -// Output a NUL-terminated string at the current cursor position -// cputs(byte* zp(3) s) -cputs: { - .label c = $23 - .label s = 3 - // [50] phi from cputs to cputs::@1 [phi:cputs->cputs::@1] - __b1_from_cputs: - // [50] phi (to_nomodify byte*) cputs::s#2 = (const byte*) main::s [phi:cputs->cputs::@1#0] -- pbuz1=pbuc1 - lda #main.s - sta.z s+1 + // cputcxy +// Move cursor and output one character +// Same as "gotoxy (x, y); cputc (c);" +// cputcxy(byte zp(6) x, byte zp(7) y, byte zp(8) c) +cputcxy: { + .label x = 6 + .label y = 7 + .label c = 8 + // [72] (byte) gotoxy::x#2 ← (byte) cputcxy::x#4 -- vbuz1=vbuz2 + lda.z x + sta.z gotoxy.x + // [73] (byte) gotoxy::y#2 ← (byte) cputcxy::y#4 -- vbuz1=vbuz2 + lda.z y + sta.z gotoxy.y + // [74] call gotoxy + // [153] phi from cputcxy to gotoxy [phi:cputcxy->gotoxy] + gotoxy_from_cputcxy: + // [153] phi (byte) gotoxy::x#4 = (byte) gotoxy::x#2 [phi:cputcxy->gotoxy#0] -- register_copy + // [153] phi (byte) gotoxy::y#4 = (byte) gotoxy::y#2 [phi:cputcxy->gotoxy#1] -- register_copy + jsr gotoxy jmp __b1 - // cputs::@1 + // cputcxy::@1 __b1: - // [51] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#2) -- vbuz1=_deref_pbuz2 - ldy #0 - lda (s),y - sta.z c - // [52] (to_nomodify byte*) cputs::s#0 ← ++ (to_nomodify byte*) cputs::s#2 -- pbuz1=_inc_pbuz1 - inc.z s - bne !+ - inc.z s+1 - !: - // [53] if((byte) 0!=(byte) cputs::c#1) goto cputs::@2 -- vbuc1_neq_vbuz1_then_la1 - lda #0 - cmp.z c - bne __b2 - jmp __breturn - // cputs::@return - __breturn: - // [54] return - rts - // cputs::@2 - __b2: - // [55] (byte) cputc::c#0 ← (byte) cputs::c#1 -- vbuz1=vbuz2 + // [75] (byte) cputc::c#1 ← (byte) cputcxy::c#4 -- vbuz1=vbuz2 lda.z c sta.z cputc.c - // [56] call cputc + // [76] call cputc + // [78] phi from cputcxy::@1 to cputc [phi:cputcxy::@1->cputc] + cputc_from___b1: + // [78] phi (byte) cputc::c#2 = (byte) cputc::c#1 [phi:cputcxy::@1->cputc#0] -- register_copy jsr cputc - // [50] phi from cputs::@2 to cputs::@1 [phi:cputs::@2->cputs::@1] - __b1_from___b2: - // [50] phi (to_nomodify byte*) cputs::s#2 = (to_nomodify byte*) cputs::s#0 [phi:cputs::@2->cputs::@1#0] -- register_copy - jmp __b1 + jmp __breturn + // cputcxy::@return + __breturn: + // [77] return + rts } // cputc // Output one character at the current cursor position // Moves the cursor forward. Scrolls the entire screen if needed -// cputc(byte zp($24) c) +// cputc(byte zp(9) c) cputc: { - .label c = $24 - // [57] if((byte) cputc::c#0==(byte) ' ') goto cputc::@1 -- vbuz1_eq_vbuc1_then_la1 + .label c = 9 + // [79] if((byte) cputc::c#2==(byte) ' ') goto cputc::@1 -- vbuz1_eq_vbuc1_then_la1 lda #'\n' cmp.z c beq __b1_from_cputc jmp __b2 // cputc::@2 __b2: - // [58] (nomodify byte*) ppuDataSet::ppuData#0 ← (byte*) conio_line_text + (byte) conio_cursor_x -- pbuz1=pbuz2_plus_vbuz3 + // [80] (nomodify byte*) ppuDataSet::ppuData#0 ← (byte*) conio_line_text + (byte) conio_cursor_x -- pbuz1=pbuz2_plus_vbuz3 lda.z conio_cursor_x clc adc.z conio_line_text @@ -3035,54 +4643,47 @@ cputc: { lda #0 adc.z conio_line_text+1 sta.z ppuDataSet.ppuData+1 - // [59] (byte) ppuDataSet::val#0 ← (byte) cputc::c#0 -- vbuz1=vbuz2 + // [81] (byte) ppuDataSet::val#0 ← (byte) cputc::c#2 -- vbuz1=vbuz2 lda.z c sta.z ppuDataSet.val - // [60] (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#2 ← (void*)(nomodify byte*) ppuDataSet::ppuData#0 -- pvoz1=pvoz2 - lda.z ppuDataSet.ppuData - sta.z ppuDataSet.ppuDataPrepare1_ppuData - lda.z ppuDataSet.ppuData+1 - sta.z ppuDataSet.ppuDataPrepare1_ppuData+1 - // [61] call ppuDataSet - // [95] phi from cputc::@2 to ppuDataSet [phi:cputc::@2->ppuDataSet] + // [82] call ppuDataSet + // [146] phi from cputc::@2 to ppuDataSet [phi:cputc::@2->ppuDataSet] ppuDataSet_from___b2: - // [95] phi (byte) ppuDataSet::val#2 = (byte) ppuDataSet::val#0 [phi:cputc::@2->ppuDataSet#0] -- register_copy - // [95] phi (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 = (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#2 [phi:cputc::@2->ppuDataSet#1] -- register_copy jsr ppuDataSet jmp __b4 // cputc::@4 __b4: - // [62] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x -- vbuz1=_inc_vbuz1 + // [83] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x -- vbuz1=_inc_vbuz1 inc.z conio_cursor_x - // [63] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return -- vbuz1_neq_vbuc1_then_la1 + // [84] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return -- vbuz1_neq_vbuc1_then_la1 lda #$20 cmp.z conio_cursor_x bne __breturn - // [64] phi from cputc::@4 to cputc::@3 [phi:cputc::@4->cputc::@3] + // [85] phi from cputc::@4 to cputc::@3 [phi:cputc::@4->cputc::@3] __b3_from___b4: jmp __b3 // cputc::@3 __b3: - // [65] call cputln + // [86] call cputln jsr cputln jmp __breturn // cputc::@return __breturn: - // [66] return + // [87] return rts - // [67] phi from cputc to cputc::@1 [phi:cputc->cputc::@1] + // [88] phi from cputc to cputc::@1 [phi:cputc->cputc::@1] __b1_from_cputc: jmp __b1 // cputc::@1 __b1: - // [68] call cputln + // [89] call cputln jsr cputln jmp __breturn } // cputln // Print a newline cputln: { - // [69] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $20 -- pbuz1=pbuz1_plus_vbuc1 + // [90] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $20 -- pbuz1=pbuz1_plus_vbuc1 lda #$20 clc adc.z conio_line_text @@ -3090,72 +4691,70 @@ cputln: { bcc !+ inc.z conio_line_text+1 !: - // [70] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1 + // [91] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta.z conio_cursor_x - // [71] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y -- vbuz1=_inc_vbuz1 + // [92] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y -- vbuz1=_inc_vbuz1 inc.z conio_cursor_y - // [72] call cscroll + // [93] call cscroll jsr cscroll jmp __breturn // cputln::@return __breturn: - // [73] return + // [94] return rts } // cscroll // Scroll the entire screen if the cursor is beyond the last line cscroll: { - .label ch = $2a - .label line2 = 6 // Scroll lines up - .label line1 = 8 - .label x = $a - .label y = 5 - // [74] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return -- vbuz1_neq_vbuc1_then_la1 + .label line1 = $d + .label line2 = $b + .label y = $a + // [95] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return -- vbuz1_neq_vbuc1_then_la1 lda #$1e cmp.z conio_cursor_y bne __breturn - // [75] phi from cscroll to cscroll::@1 [phi:cscroll->cscroll::@1] + // [96] phi from cscroll to cscroll::@1 [phi:cscroll->cscroll::@1] __b1_from_cscroll: - // [75] phi (byte*) cscroll::line1#6 = (const nomodify byte*) PPU_NAME_TABLE_0 [phi:cscroll->cscroll::@1#0] -- pbuz1=pbuc1 + // [96] phi (byte*) cscroll::line1#2 = (const nomodify byte*) PPU_NAME_TABLE_0 [phi:cscroll->cscroll::@1#0] -- pbuz1=pbuc1 lda #PPU_NAME_TABLE_0 sta.z line1+1 - // [75] phi (byte*) cscroll::line2#6 = (const nomodify byte*) PPU_NAME_TABLE_0+(byte) $20 [phi:cscroll->cscroll::@1#1] -- pbuz1=pbuc1 + // [96] phi (byte*) cscroll::line2#2 = (const nomodify byte*) PPU_NAME_TABLE_0+(byte) $20 [phi:cscroll->cscroll::@1#1] -- pbuz1=pbuc1 lda #PPU_NAME_TABLE_0+$20 sta.z line2+1 - // [75] phi (byte) cscroll::y#2 = (byte) 0 [phi:cscroll->cscroll::@1#2] -- vbuz1=vbuc1 + // [96] phi (byte) cscroll::y#2 = (byte) 0 [phi:cscroll->cscroll::@1#2] -- vbuz1=vbuc1 lda #0 sta.z y jmp __b1 // cscroll::@1 __b1: - // [76] if((byte) cscroll::y#2<(byte)(number) $1e-(number) 1) goto cscroll::@3 -- vbuz1_lt_vbuc1_then_la1 + // [97] if((byte) cscroll::y#2<(byte)(number) $1e-(number) 1) goto cscroll::@2 -- vbuz1_lt_vbuc1_then_la1 lda.z y cmp #$1e-1 - bcc __b3_from___b1 - // [77] phi from cscroll::@1 to cscroll::@2 [phi:cscroll::@1->cscroll::@2] - __b2_from___b1: - jmp __b2 - // cscroll::@2 - __b2: - // [78] call ppuDataFill + bcc __b2 + // [98] phi from cscroll::@1 to cscroll::@3 [phi:cscroll::@1->cscroll::@3] + __b3_from___b1: + jmp __b3 + // cscroll::@3 + __b3: + // [99] call ppuDataFill // Fill last line with space - // [109] phi from cscroll::@2 to ppuDataFill [phi:cscroll::@2->ppuDataFill] - ppuDataFill_from___b2: - // [109] phi (byte) ppuDataFill::val#10 = (byte) ' ' [phi:cscroll::@2->ppuDataFill#0] -- vbuz1=vbuc1 + // [136] phi from cscroll::@3 to ppuDataFill [phi:cscroll::@3->ppuDataFill] + ppuDataFill_from___b3: + // [136] phi (byte) ppuDataFill::val#10 = (byte) ' ' [phi:cscroll::@3->ppuDataFill#0] -- vbuz1=vbuc1 lda #' ' sta.z ppuDataFill.val - // [109] phi (word) ppuDataFill::size#5 = (byte) $20 [phi:cscroll::@2->ppuDataFill#1] -- vwuz1=vbuc1 + // [136] phi (word) ppuDataFill::size#5 = (byte) $20 [phi:cscroll::@3->ppuDataFill#1] -- vwuz1=vbuc1 lda #<$20 sta.z ppuDataFill.size lda #>$20 sta.z ppuDataFill.size+1 - // [109] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0+(word)(number) $1e*(number) $20-(byte) $20 [phi:cscroll::@2->ppuDataFill#2] -- pvoz1=pvoc1 + // [136] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0+(word)(number) $1e*(number) $20-(byte) $20 [phi:cscroll::@3->ppuDataFill#2] -- pvoz1=pvoc1 lda #PPU_NAME_TABLE_0+$1e*$20-$20 @@ -3164,7 +4763,7 @@ cscroll: { jmp __b6 // cscroll::@6 __b6: - // [79] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $20 -- pbuz1=pbuz1_minus_vbuc1 + // [100] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $20 -- pbuz1=pbuz1_minus_vbuc1 sec lda.z conio_line_text sbc #$20 @@ -3172,200 +4771,294 @@ cscroll: { lda.z conio_line_text+1 sbc #0 sta.z conio_line_text+1 - // [80] (byte) conio_cursor_y ← -- (byte) conio_cursor_y -- vbuz1=_dec_vbuz1 + // [101] (byte) conio_cursor_y ← -- (byte) conio_cursor_y -- vbuz1=_dec_vbuz1 dec.z conio_cursor_y jmp __breturn // cscroll::@return __breturn: - // [81] return + // [102] return rts - // [82] phi from cscroll::@1 to cscroll::@3 [phi:cscroll::@1->cscroll::@3] - __b3_from___b1: - // [82] phi (byte*) cscroll::line1#2 = (byte*) cscroll::line1#6 [phi:cscroll::@1->cscroll::@3#0] -- register_copy - // [82] phi (byte*) cscroll::line2#2 = (byte*) cscroll::line2#6 [phi:cscroll::@1->cscroll::@3#1] -- register_copy - // [82] phi (byte) cscroll::x#2 = (byte) 0 [phi:cscroll::@1->cscroll::@3#2] -- vbuz1=vbuc1 - lda #0 - sta.z x - jmp __b3 - // cscroll::@3 - __b3: - // [83] if((byte) cscroll::x#2<(byte) $20) goto cscroll::@4 -- vbuz1_lt_vbuc1_then_la1 - lda.z x - cmp #$20 - bcc __b4 + // cscroll::@2 + __b2: + // [103] (nomodify void*) ppuDataFetch::ppuData#0 ← (void*)(byte*) cscroll::line2#2 -- pvoz1=pvoz2 + lda.z line2 + sta.z ppuDataFetch.ppuData + lda.z line2+1 + sta.z ppuDataFetch.ppuData+1 + // [104] call ppuDataFetch + // [123] phi from cscroll::@2 to ppuDataFetch [phi:cscroll::@2->ppuDataFetch] + ppuDataFetch_from___b2: + jsr ppuDataFetch + jmp __b4 + // cscroll::@4 + __b4: + // [105] (nomodify void*) ppuDataTransfer::ppuData#0 ← (void*)(byte*) cscroll::line1#2 -- pvoz1=pvoz2 + lda.z line1 + sta.z ppuDataTransfer.ppuData + lda.z line1+1 + sta.z ppuDataTransfer.ppuData+1 + // [106] call ppuDataTransfer + // [110] phi from cscroll::@4 to ppuDataTransfer [phi:cscroll::@4->ppuDataTransfer] + ppuDataTransfer_from___b4: + // [110] phi (word) ppuDataTransfer::size#3 = (byte) $20 [phi:cscroll::@4->ppuDataTransfer#0] -- vwuz1=vbuc1 + lda #<$20 + sta.z ppuDataTransfer.size + lda #>$20 + sta.z ppuDataTransfer.size+1 + // [110] phi (nomodify void*) ppuDataTransfer::cpuData#2 = (void*)(const byte*) scroll_buffer [phi:cscroll::@4->ppuDataTransfer#1] -- pvoz1=pvoc1 + lda #scroll_buffer + sta.z ppuDataTransfer.cpuData+1 + // [110] phi (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 = (nomodify void*) ppuDataTransfer::ppuData#0 [phi:cscroll::@4->ppuDataTransfer#2] -- register_copy + jsr ppuDataTransfer jmp __b5 // cscroll::@5 __b5: - // [84] (byte) cscroll::y#1 ← ++ (byte) cscroll::y#2 -- vbuz1=_inc_vbuz1 - inc.z y - // [75] phi from cscroll::@5 to cscroll::@1 [phi:cscroll::@5->cscroll::@1] - __b1_from___b5: - // [75] phi (byte*) cscroll::line1#6 = (byte*) cscroll::line1#2 [phi:cscroll::@5->cscroll::@1#0] -- register_copy - // [75] phi (byte*) cscroll::line2#6 = (byte*) cscroll::line2#2 [phi:cscroll::@5->cscroll::@1#1] -- register_copy - // [75] phi (byte) cscroll::y#2 = (byte) cscroll::y#1 [phi:cscroll::@5->cscroll::@1#2] -- register_copy - jmp __b1 - // cscroll::@4 - __b4: - // [85] (nomodify void*) ppuDataGet::ppuData#0 ← (void*)(byte*) cscroll::line2#2 -- pvoz1=pvoz2 - lda.z line2 - sta.z ppuDataGet.ppuData - lda.z line2+1 - sta.z ppuDataGet.ppuData+1 - // [86] call ppuDataGet - // [102] phi from cscroll::@4 to ppuDataGet [phi:cscroll::@4->ppuDataGet] - ppuDataGet_from___b4: - jsr ppuDataGet - // [87] (byte) ppuDataGet::return#2 ← (byte) ppuDataGet::ppuDataRead1_return#0 -- vbuz1=vbuz2 - lda.z ppuDataGet.ppuDataRead1_return - sta.z ppuDataGet.return - jmp __b7 - // cscroll::@7 - __b7: - // [88] (byte) cscroll::ch#0 ← (byte) ppuDataGet::return#2 -- vbuz1=vbuz2 - lda.z ppuDataGet.return - sta.z ch - // [89] (byte*) cscroll::line2#1 ← ++ (byte*) cscroll::line2#2 -- pbuz1=_inc_pbuz1 - inc.z line2 - bne !+ - inc.z line2+1 - !: - // [90] (nomodify void*) ppuDataSet::ppuData#1 ← (void*)(byte*) cscroll::line1#2 -- pvoz1=pvoz2 - lda.z line1 - sta.z ppuDataSet.ppuData_1 - lda.z line1+1 - sta.z ppuDataSet.ppuData_1+1 - // [91] (byte) ppuDataSet::val#1 ← (byte) cscroll::ch#0 -- vbuz1=vbuz2 - lda.z ch - sta.z ppuDataSet.val - // [92] call ppuDataSet - // [95] phi from cscroll::@7 to ppuDataSet [phi:cscroll::@7->ppuDataSet] - ppuDataSet_from___b7: - // [95] phi (byte) ppuDataSet::val#2 = (byte) ppuDataSet::val#1 [phi:cscroll::@7->ppuDataSet#0] -- register_copy - // [95] phi (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 = (nomodify void*) ppuDataSet::ppuData#1 [phi:cscroll::@7->ppuDataSet#1] -- register_copy - jsr ppuDataSet - jmp __b8 - // cscroll::@8 - __b8: - // [93] (byte*) cscroll::line1#1 ← ++ (byte*) cscroll::line1#2 -- pbuz1=_inc_pbuz1 - inc.z line1 - bne !+ + // [107] (byte*) cscroll::line1#1 ← (byte*) cscroll::line1#2 + (byte) $20 -- pbuz1=pbuz1_plus_vbuc1 + lda #$20 + clc + adc.z line1 + sta.z line1 + bcc !+ inc.z line1+1 !: - // [94] (byte) cscroll::x#1 ← ++ (byte) cscroll::x#2 -- vbuz1=_inc_vbuz1 - inc.z x - // [82] phi from cscroll::@8 to cscroll::@3 [phi:cscroll::@8->cscroll::@3] - __b3_from___b8: - // [82] phi (byte*) cscroll::line1#2 = (byte*) cscroll::line1#1 [phi:cscroll::@8->cscroll::@3#0] -- register_copy - // [82] phi (byte*) cscroll::line2#2 = (byte*) cscroll::line2#1 [phi:cscroll::@8->cscroll::@3#1] -- register_copy - // [82] phi (byte) cscroll::x#2 = (byte) cscroll::x#1 [phi:cscroll::@8->cscroll::@3#2] -- register_copy - jmp __b3 + // [108] (byte*) cscroll::line2#1 ← (byte*) cscroll::line2#2 + (byte) $20 -- pbuz1=pbuz1_plus_vbuc1 + lda #$20 + clc + adc.z line2 + sta.z line2 + bcc !+ + inc.z line2+1 + !: + // [109] (byte) cscroll::y#1 ← ++ (byte) cscroll::y#2 -- vbuz1=_inc_vbuz1 + inc.z y + // [96] phi from cscroll::@5 to cscroll::@1 [phi:cscroll::@5->cscroll::@1] + __b1_from___b5: + // [96] phi (byte*) cscroll::line1#2 = (byte*) cscroll::line1#1 [phi:cscroll::@5->cscroll::@1#0] -- register_copy + // [96] phi (byte*) cscroll::line2#2 = (byte*) cscroll::line2#1 [phi:cscroll::@5->cscroll::@1#1] -- register_copy + // [96] phi (byte) cscroll::y#2 = (byte) cscroll::y#1 [phi:cscroll::@5->cscroll::@1#2] -- register_copy + jmp __b1 } - // ppuDataSet -// Set one byte in PPU memory + // ppuDataTransfer +// Transfer a number of bytes from the CPU memory to the PPU memory +// - cpuData : Pointer to the CPU memory (RAM of ROM) // - ppuData : Pointer in the PPU memory -// - val : The value to set -// ppuDataSet(byte* zp($25) ppuData, byte zp($d) val) -ppuDataSet: { - .label ppuDataPrepare1___0 = $2b - .label ppuDataPrepare1___1 = $2c - .label ppuDataPrepare1_ppuData = $b - .label ppuData = $25 - .label val = $d - .label ppuData_1 = $b +// - size : The number of bytes to transfer +// ppuDataTransfer(void* zp($f) ppuData, void* zp($11) cpuData, word zp($13) size) +ppuDataTransfer: { + .label ppuDataPrepare1___0 = $40 + .label ppuDataPrepare1___1 = $41 + .label ppuDataPrepare1_ppuData = $f + .label ppuDataPut1_val = $42 + .label cpuSrc = $17 + .label i = $15 + .label ppuData = $f + .label cpuData = $11 + .label size = $13 jmp ppuDataPrepare1 - // ppuDataSet::ppuDataPrepare1 + // ppuDataTransfer::ppuDataPrepare1 ppuDataPrepare1: - // [96] (byte~) ppuDataSet::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 -- vbuz1=_hi_pvoz2 + // [111] (byte~) ppuDataTransfer::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 -- vbuz1=_hi_pvoz2 lda.z ppuDataPrepare1_ppuData+1 sta.z ppuDataPrepare1___0 - // [97] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuz1 + // [112] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuz1 lda.z ppuDataPrepare1___0 sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - // [98] (byte~) ppuDataSet::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 -- vbuz1=_lo_pvoz2 + // [113] (byte~) ppuDataTransfer::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 -- vbuz1=_lo_pvoz2 lda.z ppuDataPrepare1_ppuData sta.z ppuDataPrepare1___1 - // [99] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuz1 + // [114] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuz1 lda.z ppuDataPrepare1___1 sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - jmp ppuDataPut1 - // ppuDataSet::ppuDataPut1 - ppuDataPut1: - // [100] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataSet::val#2 -- _deref_pbuc1=vbuz1 - lda.z val - sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + jmp __b3 + // ppuDataTransfer::@3 + __b3: + // [115] (byte*) ppuDataTransfer::cpuSrc#6 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 -- pbuz1=pbuz2 + lda.z cpuData + sta.z cpuSrc + lda.z cpuData+1 + sta.z cpuSrc+1 + // [116] phi from ppuDataTransfer::@3 to ppuDataTransfer::@1 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1] + __b1_from___b3: + // [116] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*) ppuDataTransfer::cpuSrc#6 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#0] -- register_copy + // [116] phi (word) ppuDataTransfer::i#2 = (word) 0 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#1] -- vwuz1=vwuc1 + lda #<0 + sta.z i + lda #>0 + sta.z i+1 + jmp __b1 + // ppuDataTransfer::@1 + __b1: + // [117] if((word) ppuDataTransfer::i#2<(word) ppuDataTransfer::size#3) goto ppuDataTransfer::@2 -- vwuz1_lt_vwuz2_then_la1 + lda.z i+1 + cmp.z size+1 + bcc __b2 + bne !+ + lda.z i + cmp.z size + bcc __b2 + !: jmp __breturn - // ppuDataSet::@return + // ppuDataTransfer::@return __breturn: - // [101] return + // [118] return rts + // ppuDataTransfer::@2 + __b2: + // [119] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) -- vbuz1=_deref_pbuz2 + ldy #0 + lda (cpuSrc),y + sta.z ppuDataPut1_val + jmp ppuDataPut1 + // ppuDataTransfer::ppuDataPut1 + ppuDataPut1: + // [120] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 -- _deref_pbuc1=vbuz1 + lda.z ppuDataPut1_val + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + jmp __b4 + // ppuDataTransfer::@4 + __b4: + // [121] (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#2 -- pbuz1=_inc_pbuz1 + inc.z cpuSrc + bne !+ + inc.z cpuSrc+1 + !: + // [122] (word) ppuDataTransfer::i#1 ← ++ (word) ppuDataTransfer::i#2 -- vwuz1=_inc_vwuz1 + inc.z i + bne !+ + inc.z i+1 + !: + // [116] phi from ppuDataTransfer::@4 to ppuDataTransfer::@1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1] + __b1_from___b4: + // [116] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*) ppuDataTransfer::cpuSrc#1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1#0] -- register_copy + // [116] phi (word) ppuDataTransfer::i#2 = (word) ppuDataTransfer::i#1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1#1] -- register_copy + jmp __b1 } - // ppuDataGet -// Get one byte from PPU memory + // ppuDataFetch +// Transfer a number of bytes from the PPU memory to the CPU memory // - ppuData : Pointer in the PPU memory -// ppuDataGet(void* zp($27) ppuData) -ppuDataGet: { - .label ppuDataPrepare1___0 = $2d - .label ppuDataPrepare1___1 = $2e - .label ppuDataRead1_return = $2f - .label ppuData = $27 - .label return = $29 +// - cpuData : Pointer to the CPU memory (RAM of ROM) +// - size : The number of bytes to transfer +// ppuDataFetch(void* zp($3e) ppuData) +ppuDataFetch: { + .const size = $20 + .label cpuData = scroll_buffer + .label ppuDataPrepare1___0 = $43 + .label ppuDataPrepare1___1 = $44 + .label ppuDataRead1_return = $45 + // Fetch from PPU to CPU + .label cpuDst = $1b + .label i = $19 + .label ppuData = $3e jmp ppuDataPrepare1 - // ppuDataGet::ppuDataPrepare1 + // ppuDataFetch::ppuDataPrepare1 ppuDataPrepare1: - // [103] (byte~) ppuDataGet::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataGet::ppuData#0 -- vbuz1=_hi_pvoz2 + // [124] (byte~) ppuDataFetch::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFetch::ppuData#0 -- vbuz1=_hi_pvoz2 lda.z ppuData+1 sta.z ppuDataPrepare1___0 - // [104] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataGet::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuz1 + // [125] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFetch::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuz1 lda.z ppuDataPrepare1___0 sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - // [105] (byte~) ppuDataGet::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataGet::ppuData#0 -- vbuz1=_lo_pvoz2 + // [126] (byte~) ppuDataFetch::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFetch::ppuData#0 -- vbuz1=_lo_pvoz2 lda.z ppuData sta.z ppuDataPrepare1___1 - // [106] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataGet::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuz1 + // [127] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFetch::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuz1 lda.z ppuDataPrepare1___1 sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - jmp ppuDataRead1 - // ppuDataGet::ppuDataRead1 + jmp __b2 + // ppuDataFetch::@2 + __b2: + // asm { ldaPPU_PPUDATA } + // Perform a dummy-read to discard the current value in the data read buffer and update it with the first byte from the PPU address + lda PPU_PPUDATA + // [129] phi from ppuDataFetch::@2 to ppuDataFetch::@1 [phi:ppuDataFetch::@2->ppuDataFetch::@1] + __b1_from___b2: + // [129] phi (byte*) ppuDataFetch::cpuDst#2 = (byte*)(const nomodify void*) ppuDataFetch::cpuData#0 [phi:ppuDataFetch::@2->ppuDataFetch::@1#0] -- pbuz1=pbuc1 + lda #cpuData + sta.z cpuDst+1 + // [129] phi (word) ppuDataFetch::i#2 = (word) 0 [phi:ppuDataFetch::@2->ppuDataFetch::@1#1] -- vwuz1=vwuc1 + lda #<0 + sta.z i + lda #>0 + sta.z i+1 + jmp __b1 + // ppuDataFetch::@1 + __b1: + // [130] if((word) ppuDataFetch::i#2<(const word) ppuDataFetch::size#0) goto ppuDataFetch::ppuDataRead1 -- vwuz1_lt_vwuc1_then_la1 + lda.z i+1 + cmp #>size + bcc ppuDataRead1 + bne !+ + lda.z i + cmp #ppuDataFetch::@1] + __b1_from___b3: + // [129] phi (byte*) ppuDataFetch::cpuDst#2 = (byte*) ppuDataFetch::cpuDst#1 [phi:ppuDataFetch::@3->ppuDataFetch::@1#0] -- register_copy + // [129] phi (word) ppuDataFetch::i#2 = (word) ppuDataFetch::i#1 [phi:ppuDataFetch::@3->ppuDataFetch::@1#1] -- register_copy + jmp __b1 } // ppuDataFill // Fill a number of bytes in the PPU memory // - ppuData : Pointer in the PPU memory // - size : The number of bytes to transfer -// ppuDataFill(byte zp($12) val, word zp($10) size) +// ppuDataFill(byte zp($21) val, word zp($1f) size) ppuDataFill: { - .label ppuDataPrepare1___0 = $30 - .label ppuDataPrepare1___1 = $31 - .label ppuDataPrepare1_ppuData = $e - .label i = $13 - .label size = $10 - .label val = $12 + .label ppuDataPrepare1___0 = $46 + .label ppuDataPrepare1___1 = $47 + .label ppuDataPrepare1_ppuData = $1d + .label i = $22 + .label size = $1f + .label val = $21 jmp ppuDataPrepare1 // ppuDataFill::ppuDataPrepare1 ppuDataPrepare1: - // [110] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 -- vbuz1=_hi_pvoz2 + // [137] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 -- vbuz1=_hi_pvoz2 lda.z ppuDataPrepare1_ppuData+1 sta.z ppuDataPrepare1___0 - // [111] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuz1 + // [138] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuz1 lda.z ppuDataPrepare1___0 sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - // [112] (byte~) ppuDataFill::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 -- vbuz1=_lo_pvoz2 + // [139] (byte~) ppuDataFill::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 -- vbuz1=_lo_pvoz2 lda.z ppuDataPrepare1_ppuData sta.z ppuDataPrepare1___1 - // [113] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuz1 + // [140] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuz1 lda.z ppuDataPrepare1___1 sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - // [114] phi from ppuDataFill::ppuDataPrepare1 to ppuDataFill::@1 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1] + // [141] phi from ppuDataFill::ppuDataPrepare1 to ppuDataFill::@1 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1] __b1_from_ppuDataPrepare1: - // [114] phi (word) ppuDataFill::i#2 = (word) 0 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1#0] -- vwuz1=vwuc1 + // [141] phi (word) ppuDataFill::i#2 = (word) 0 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1#0] -- vwuz1=vwuc1 lda #<0 sta.z i lda #>0 @@ -3374,7 +5067,7 @@ ppuDataFill: { // Transfer to PPU // ppuDataFill::@1 __b1: - // [115] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#5) goto ppuDataFill::ppuDataPut1 -- vwuz1_lt_vwuz2_then_la1 + // [142] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#5) goto ppuDataFill::ppuDataPut1 -- vwuz1_lt_vwuz2_then_la1 lda.z i+1 cmp.z size+1 bcc ppuDataPut1 @@ -3386,41 +5079,449 @@ ppuDataFill: { jmp __breturn // ppuDataFill::@return __breturn: - // [116] return + // [143] return rts // ppuDataFill::ppuDataPut1 ppuDataPut1: - // [117] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataFill::val#10 -- _deref_pbuc1=vbuz1 + // [144] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataFill::val#10 -- _deref_pbuc1=vbuz1 lda.z val sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA jmp __b2 // ppuDataFill::@2 __b2: - // [118] (word) ppuDataFill::i#1 ← ++ (word) ppuDataFill::i#2 -- vwuz1=_inc_vwuz1 + // [145] (word) ppuDataFill::i#1 ← ++ (word) ppuDataFill::i#2 -- vwuz1=_inc_vwuz1 inc.z i bne !+ inc.z i+1 !: - // [114] phi from ppuDataFill::@2 to ppuDataFill::@1 [phi:ppuDataFill::@2->ppuDataFill::@1] + // [141] phi from ppuDataFill::@2 to ppuDataFill::@1 [phi:ppuDataFill::@2->ppuDataFill::@1] __b1_from___b2: - // [114] phi (word) ppuDataFill::i#2 = (word) ppuDataFill::i#1 [phi:ppuDataFill::@2->ppuDataFill::@1#0] -- register_copy + // [141] phi (word) ppuDataFill::i#2 = (word) ppuDataFill::i#1 [phi:ppuDataFill::@2->ppuDataFill::@1#0] -- register_copy + jmp __b1 +} + // ppuDataSet +// Set one byte in PPU memory +// - ppuData : Pointer in the PPU memory +// - val : The value to set +// ppuDataSet(byte* zp($3b) ppuData, byte zp($3d) val) +ppuDataSet: { + .label ppuDataPrepare1___0 = $48 + .label ppuDataPrepare1___1 = $49 + .label ppuData = $3b + .label val = $3d + jmp ppuDataPrepare1 + // ppuDataSet::ppuDataPrepare1 + ppuDataPrepare1: + // [147] (byte~) ppuDataSet::ppuDataPrepare1_$0 ← > (void*)(nomodify byte*) ppuDataSet::ppuData#0 -- vbuz1=_hi_pvoz2 + lda.z ppuData+1 + sta.z ppuDataPrepare1___0 + // [148] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuz1 + lda.z ppuDataPrepare1___0 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + // [149] (byte~) ppuDataSet::ppuDataPrepare1_$1 ← < (void*)(nomodify byte*) ppuDataSet::ppuData#0 -- vbuz1=_lo_pvoz2 + lda.z ppuData + sta.z ppuDataPrepare1___1 + // [150] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuz1 + lda.z ppuDataPrepare1___1 + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + jmp ppuDataPut1 + // ppuDataSet::ppuDataPut1 + ppuDataPut1: + // [151] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataSet::val#0 -- _deref_pbuc1=vbuz1 + lda.z val + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + jmp __breturn + // ppuDataSet::@return + __breturn: + // [152] return + rts +} + // gotoxy +// Set the cursor to the specified position +// gotoxy(byte zp($25) x, byte zp($24) y) +gotoxy: { + .label __5 = $4e + .label __6 = $4a + .label line_offset = $4c + .label x = $25 + .label y = $24 + // [154] if((byte) gotoxy::y#4<(byte) $1e+(byte) 1) goto gotoxy::@3 -- vbuz1_lt_vbuc1_then_la1 + lda.z y + cmp #$1e+1 + bcc __b3_from_gotoxy + // [156] phi from gotoxy to gotoxy::@1 [phi:gotoxy->gotoxy::@1] + __b1_from_gotoxy: + // [156] phi (byte) gotoxy::y#5 = (byte) 0 [phi:gotoxy->gotoxy::@1#0] -- vbuz1=vbuc1 + lda #0 + sta.z y + jmp __b1 + // [155] phi from gotoxy to gotoxy::@3 [phi:gotoxy->gotoxy::@3] + __b3_from_gotoxy: + jmp __b3 + // gotoxy::@3 + __b3: + // [156] phi from gotoxy::@3 to gotoxy::@1 [phi:gotoxy::@3->gotoxy::@1] + __b1_from___b3: + // [156] phi (byte) gotoxy::y#5 = (byte) gotoxy::y#4 [phi:gotoxy::@3->gotoxy::@1#0] -- register_copy + jmp __b1 + // gotoxy::@1 + __b1: + // [157] if((byte) gotoxy::x#4<(byte) $20) goto gotoxy::@4 -- vbuz1_lt_vbuc1_then_la1 + lda.z x + cmp #$20 + bcc __b4_from___b1 + // [159] phi from gotoxy::@1 to gotoxy::@2 [phi:gotoxy::@1->gotoxy::@2] + __b2_from___b1: + // [159] phi (byte) gotoxy::x#5 = (byte) 0 [phi:gotoxy::@1->gotoxy::@2#0] -- vbuz1=vbuc1 + lda #0 + sta.z x + jmp __b2 + // [158] phi from gotoxy::@1 to gotoxy::@4 [phi:gotoxy::@1->gotoxy::@4] + __b4_from___b1: + jmp __b4 + // gotoxy::@4 + __b4: + // [159] phi from gotoxy::@4 to gotoxy::@2 [phi:gotoxy::@4->gotoxy::@2] + __b2_from___b4: + // [159] phi (byte) gotoxy::x#5 = (byte) gotoxy::x#4 [phi:gotoxy::@4->gotoxy::@2#0] -- register_copy + jmp __b2 + // gotoxy::@2 + __b2: + // [160] (byte) conio_cursor_x ← (byte) gotoxy::x#5 -- vbuz1=vbuz2 + lda.z x + sta.z conio_cursor_x + // [161] (byte) conio_cursor_y ← (byte) gotoxy::y#5 -- vbuz1=vbuz2 + lda.z y + sta.z conio_cursor_y + // [162] (word~) gotoxy::$6 ← (word)(byte) gotoxy::y#5 -- vwuz1=_word_vbuz2 + lda.z y + sta.z __6 + lda #0 + sta.z __6+1 + // [163] (word) gotoxy::line_offset#0 ← (word~) gotoxy::$6 << (byte) 5 -- vwuz1=vwuz2_rol_5 + lda.z __6 + asl + sta.z line_offset + lda.z __6+1 + rol + sta.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + // [164] (byte*~) gotoxy::$5 ← (const nomodify byte*) PPU_NAME_TABLE_0 + (word) gotoxy::line_offset#0 -- pbuz1=pbuc1_plus_vwuz2 + lda.z line_offset + clc + adc #PPU_NAME_TABLE_0 + sta.z __5+1 + // [165] (byte*) conio_line_text ← (byte*~) gotoxy::$5 -- pbuz1=pbuz2 + lda.z __5 + sta.z conio_line_text + lda.z __5+1 + sta.z conio_line_text+1 + jmp __breturn + // gotoxy::@return + __breturn: + // [166] return + rts +} + // cputsxy +// Move cursor and output a NUL-terminated string +// Same as "gotoxy (x, y); puts (s);" +// cputsxy(byte zp($39) x, byte zp($3a) y) +cputsxy: { + .label x = $39 + .label y = $3a + // [167] (byte) gotoxy::x#3 ← (byte) cputsxy::x#0 -- vbuz1=vbuz2 + lda.z x + sta.z gotoxy.x + // [168] (byte) gotoxy::y#3 ← (byte) cputsxy::y#0 -- vbuz1=vbuz2 + lda.z y + sta.z gotoxy.y + // [169] call gotoxy + // [153] phi from cputsxy to gotoxy [phi:cputsxy->gotoxy] + gotoxy_from_cputsxy: + // [153] phi (byte) gotoxy::x#4 = (byte) gotoxy::x#3 [phi:cputsxy->gotoxy#0] -- register_copy + // [153] phi (byte) gotoxy::y#4 = (byte) gotoxy::y#3 [phi:cputsxy->gotoxy#1] -- register_copy + jsr gotoxy + // [170] phi from cputsxy to cputsxy::@1 [phi:cputsxy->cputsxy::@1] + __b1_from_cputsxy: + jmp __b1 + // cputsxy::@1 + __b1: + // [171] call cputs + // [173] phi from cputsxy::@1 to cputs [phi:cputsxy::@1->cputs] + cputs_from___b1: + jsr cputs + jmp __breturn + // cputsxy::@return + __breturn: + // [172] return + rts +} + // cputs +// Output a NUL-terminated string at the current cursor position +// cputs(byte* zp($26) s) +cputs: { + .label c = $50 + .label s = $26 + // [174] phi from cputs to cputs::@1 [phi:cputs->cputs::@1] + __b1_from_cputs: + // [174] phi (to_nomodify byte*) cputs::s#2 = (const byte*) num_buffer [phi:cputs->cputs::@1#0] -- pbuz1=pbuc1 + lda #num_buffer + sta.z s+1 + jmp __b1 + // cputs::@1 + __b1: + // [175] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#2) -- vbuz1=_deref_pbuz2 + ldy #0 + lda (s),y + sta.z c + // [176] (to_nomodify byte*) cputs::s#0 ← ++ (to_nomodify byte*) cputs::s#2 -- pbuz1=_inc_pbuz1 + inc.z s + bne !+ + inc.z s+1 + !: + // [177] if((byte) 0!=(byte) cputs::c#1) goto cputs::@2 -- vbuc1_neq_vbuz1_then_la1 + lda #0 + cmp.z c + bne __b2 + jmp __breturn + // cputs::@return + __breturn: + // [178] return + rts + // cputs::@2 + __b2: + // [179] (byte) cputc::c#0 ← (byte) cputs::c#1 -- vbuz1=vbuz2 + lda.z c + sta.z cputc.c + // [180] call cputc + // [78] phi from cputs::@2 to cputc [phi:cputs::@2->cputc] + cputc_from___b2: + // [78] phi (byte) cputc::c#2 = (byte) cputc::c#0 [phi:cputs::@2->cputc#0] -- register_copy + jsr cputc + // [174] phi from cputs::@2 to cputs::@1 [phi:cputs::@2->cputs::@1] + __b1_from___b2: + // [174] phi (to_nomodify byte*) cputs::s#2 = (to_nomodify byte*) cputs::s#0 [phi:cputs::@2->cputs::@1#0] -- register_copy + jmp __b1 +} + // uctoa +// Converts unsigned number value to a string representing it in RADIX format. +// If the leading digits are zero they are not included in the string. +// - value : The number to be converted to RADIX +// - buffer : receives the string representing the number and zero-termination. +// - radix : The radix to convert the number to (from the enum RADIX) +// uctoa(byte zp($29) value, byte* zp($51) buffer) +uctoa: { + .const max_digits = 2 + .label digit_value = $53 + .label buffer = $51 + .label digit = $28 + .label value = $29 + .label buffer_1 = $2b + .label started = $2a + // [182] phi from uctoa to uctoa::@1 [phi:uctoa->uctoa::@1] + __b1_from_uctoa: + // [182] phi (byte*) uctoa::buffer#11 = (const byte*) num_buffer [phi:uctoa->uctoa::@1#0] -- pbuz1=pbuc1 + lda #num_buffer + sta.z buffer_1+1 + // [182] phi (byte) uctoa::started#2 = (byte) 0 [phi:uctoa->uctoa::@1#1] -- vbuz1=vbuc1 + lda #0 + sta.z started + // [182] phi (byte) uctoa::value#2 = (byte) uctoa::value#1 [phi:uctoa->uctoa::@1#2] -- register_copy + // [182] phi (byte) uctoa::digit#2 = (byte) 0 [phi:uctoa->uctoa::@1#3] -- vbuz1=vbuc1 + lda #0 + sta.z digit + jmp __b1 + // uctoa::@1 + __b1: + // [183] if((byte) uctoa::digit#2<(const byte) uctoa::max_digits#2-(byte) 1) goto uctoa::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z digit + cmp #max_digits-1 + bcc __b2 + jmp __b3 + // uctoa::@3 + __b3: + // [184] *((byte*) uctoa::buffer#11) ← *((const byte*) DIGITS + (byte) uctoa::value#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + ldy.z value + lda DIGITS,y + ldy #0 + sta (buffer_1),y + // [185] (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#11 -- pbuz1=_inc_pbuz2 + lda.z buffer_1 + clc + adc #1 + sta.z buffer + lda.z buffer_1+1 + adc #0 + sta.z buffer+1 + // [186] *((byte*) uctoa::buffer#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 + lda #0 + ldy #0 + sta (buffer),y + jmp __breturn + // uctoa::@return + __breturn: + // [187] return + rts + // uctoa::@2 + __b2: + // [188] (byte) uctoa::digit_value#0 ← *((const byte*) RADIX_HEXADECIMAL_VALUES_CHAR + (byte) uctoa::digit#2) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z digit + lda RADIX_HEXADECIMAL_VALUES_CHAR,y + sta.z digit_value + // [189] if((byte) 0!=(byte) uctoa::started#2) goto uctoa::@5 -- vbuc1_neq_vbuz1_then_la1 + lda #0 + cmp.z started + bne __b5 + jmp __b7 + // uctoa::@7 + __b7: + // [190] if((byte) uctoa::value#2>=(byte) uctoa::digit_value#0) goto uctoa::@5 -- vbuz1_ge_vbuz2_then_la1 + lda.z value + cmp.z digit_value + bcs __b5 + // [191] phi from uctoa::@7 to uctoa::@4 [phi:uctoa::@7->uctoa::@4] + __b4_from___b7: + // [191] phi (byte*) uctoa::buffer#14 = (byte*) uctoa::buffer#11 [phi:uctoa::@7->uctoa::@4#0] -- register_copy + // [191] phi (byte) uctoa::started#4 = (byte) uctoa::started#2 [phi:uctoa::@7->uctoa::@4#1] -- register_copy + // [191] phi (byte) uctoa::value#6 = (byte) uctoa::value#2 [phi:uctoa::@7->uctoa::@4#2] -- register_copy + jmp __b4 + // uctoa::@4 + __b4: + // [192] (byte) uctoa::digit#1 ← ++ (byte) uctoa::digit#2 -- vbuz1=_inc_vbuz1 + inc.z digit + // [182] phi from uctoa::@4 to uctoa::@1 [phi:uctoa::@4->uctoa::@1] + __b1_from___b4: + // [182] phi (byte*) uctoa::buffer#11 = (byte*) uctoa::buffer#14 [phi:uctoa::@4->uctoa::@1#0] -- register_copy + // [182] phi (byte) uctoa::started#2 = (byte) uctoa::started#4 [phi:uctoa::@4->uctoa::@1#1] -- register_copy + // [182] phi (byte) uctoa::value#2 = (byte) uctoa::value#6 [phi:uctoa::@4->uctoa::@1#2] -- register_copy + // [182] phi (byte) uctoa::digit#2 = (byte) uctoa::digit#1 [phi:uctoa::@4->uctoa::@1#3] -- register_copy + jmp __b1 + // uctoa::@5 + __b5: + // [193] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#11 -- pbuz1=pbuz2 + lda.z buffer_1 + sta.z uctoa_append.buffer + lda.z buffer_1+1 + sta.z uctoa_append.buffer+1 + // [194] (byte) uctoa_append::value#0 ← (byte) uctoa::value#2 -- vbuz1=vbuz2 + lda.z value + sta.z uctoa_append.value + // [195] (byte) uctoa_append::sub#0 ← (byte) uctoa::digit_value#0 -- vbuz1=vbuz2 + lda.z digit_value + sta.z uctoa_append.sub + // [196] call uctoa_append + // [200] phi from uctoa::@5 to uctoa_append [phi:uctoa::@5->uctoa_append] + uctoa_append_from___b5: + jsr uctoa_append + // [197] (byte) uctoa_append::return#0 ← (byte) uctoa_append::value#2 -- vbuz1=vbuz2 + lda.z uctoa_append.value + sta.z uctoa_append.return + jmp __b6 + // uctoa::@6 + __b6: + // [198] (byte) uctoa::value#0 ← (byte) uctoa_append::return#0 -- vbuz1=vbuz2 + lda.z uctoa_append.return + sta.z value + // [199] (byte*) uctoa::buffer#4 ← ++ (byte*) uctoa::buffer#11 -- pbuz1=_inc_pbuz1 + inc.z buffer_1 + bne !+ + inc.z buffer_1+1 + !: + // [191] phi from uctoa::@6 to uctoa::@4 [phi:uctoa::@6->uctoa::@4] + __b4_from___b6: + // [191] phi (byte*) uctoa::buffer#14 = (byte*) uctoa::buffer#4 [phi:uctoa::@6->uctoa::@4#0] -- register_copy + // [191] phi (byte) uctoa::started#4 = (byte) 1 [phi:uctoa::@6->uctoa::@4#1] -- vbuz1=vbuc1 + lda #1 + sta.z started + // [191] phi (byte) uctoa::value#6 = (byte) uctoa::value#0 [phi:uctoa::@6->uctoa::@4#2] -- register_copy + jmp __b4 +} + // uctoa_append +// Used to convert a single digit of an unsigned number value to a string representation +// Counts a single digit up from '0' as long as the value is larger than sub. +// Each time the digit is increased sub is subtracted from value. +// - buffer : pointer to the char that receives the digit +// - value : The value where the digit will be derived from +// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. +// (For decimal the subs used are 10000, 1000, 100, 10, 1) +// returns : the value reduced by sub * digit so that it is less than sub. +// uctoa_append(byte* zp($54) buffer, byte zp($2d) value, byte zp($56) sub) +uctoa_append: { + .label buffer = $54 + .label value = $2d + .label sub = $56 + .label return = $57 + .label digit = $2e + // [201] phi from uctoa_append to uctoa_append::@1 [phi:uctoa_append->uctoa_append::@1] + __b1_from_uctoa_append: + // [201] phi (byte) uctoa_append::digit#2 = (byte) 0 [phi:uctoa_append->uctoa_append::@1#0] -- vbuz1=vbuc1 + lda #0 + sta.z digit + // [201] phi (byte) uctoa_append::value#2 = (byte) uctoa_append::value#0 [phi:uctoa_append->uctoa_append::@1#1] -- register_copy + jmp __b1 + // uctoa_append::@1 + __b1: + // [202] if((byte) uctoa_append::value#2>=(byte) uctoa_append::sub#0) goto uctoa_append::@2 -- vbuz1_ge_vbuz2_then_la1 + lda.z value + cmp.z sub + bcs __b2 + jmp __b3 + // uctoa_append::@3 + __b3: + // [203] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuz2 + ldy.z digit + lda DIGITS,y + ldy #0 + sta (buffer),y + jmp __breturn + // uctoa_append::@return + __breturn: + // [204] return + rts + // uctoa_append::@2 + __b2: + // [205] (byte) uctoa_append::digit#1 ← ++ (byte) uctoa_append::digit#2 -- vbuz1=_inc_vbuz1 + inc.z digit + // [206] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0 -- vbuz1=vbuz1_minus_vbuz2 + lda.z value + sec + sbc.z sub + sta.z value + // [201] phi from uctoa_append::@2 to uctoa_append::@1 [phi:uctoa_append::@2->uctoa_append::@1] + __b1_from___b2: + // [201] phi (byte) uctoa_append::digit#2 = (byte) uctoa_append::digit#1 [phi:uctoa_append::@2->uctoa_append::@1#0] -- register_copy + // [201] phi (byte) uctoa_append::value#2 = (byte) uctoa_append::value#1 [phi:uctoa_append::@2->uctoa_append::@1#1] -- register_copy jmp __b1 } // clrscr // clears the screen and moves the cursor to the upper left-hand corner of the screen. clrscr: { - // [120] call ppuDataFill - // [109] phi from clrscr to ppuDataFill [phi:clrscr->ppuDataFill] + // [208] call ppuDataFill + // [136] phi from clrscr to ppuDataFill [phi:clrscr->ppuDataFill] ppuDataFill_from_clrscr: - // [109] phi (byte) ppuDataFill::val#10 = (byte) ' ' [phi:clrscr->ppuDataFill#0] -- vbuz1=vbuc1 + // [136] phi (byte) ppuDataFill::val#10 = (byte) ' ' [phi:clrscr->ppuDataFill#0] -- vbuz1=vbuc1 lda #' ' sta.z ppuDataFill.val - // [109] phi (word) ppuDataFill::size#5 = (word) $3c0 [phi:clrscr->ppuDataFill#1] -- vwuz1=vwuc1 + // [136] phi (word) ppuDataFill::size#5 = (word) $3c0 [phi:clrscr->ppuDataFill#1] -- vwuz1=vwuc1 lda #<$3c0 sta.z ppuDataFill.size lda #>$3c0 sta.z ppuDataFill.size+1 - // [109] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0 [phi:clrscr->ppuDataFill#2] -- pvoz1=pvoc1 + // [136] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0 [phi:clrscr->ppuDataFill#2] -- pvoz1=pvoc1 lda #PPU_NAME_TABLE_0 @@ -3429,13 +5530,13 @@ clrscr: { jmp __b1 // clrscr::@1 __b1: - // [121] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1 + // [209] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta.z conio_cursor_x - // [122] (byte) conio_cursor_y ← (byte) 0 -- vbuz1=vbuc1 + // [210] (byte) conio_cursor_y ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta.z conio_cursor_y - // [123] (byte*) conio_line_text ← (const nomodify byte*) PPU_NAME_TABLE_0 -- pbuz1=pbuc1 + // [211] (byte*) conio_line_text ← (const nomodify byte*) PPU_NAME_TABLE_0 -- pbuz1=pbuc1 lda #PPU_NAME_TABLE_0 @@ -3443,210 +5544,128 @@ clrscr: { jmp __breturn // clrscr::@return __breturn: - // [124] return + // [212] return rts -} - // ppuDataTransfer -// Transfer a number of bytes from the CPU memory to the PPU memory -// - cpuData : Pointer to the CPU memory (RAM of ROM) -// - ppuData : Pointer in the PPU memory -// - size : The number of bytes to transfer -ppuDataTransfer: { - .const size = $20*SIZEOF_BYTE - .label ppuData = PPU_PALETTE - .label cpuData = PALETTE - .label ppuDataPut1_val = $32 - // Transfer to PPU - .label cpuSrc = $17 - .label i = $15 - jmp ppuDataPrepare1 - // ppuDataTransfer::ppuDataPrepare1 - ppuDataPrepare1: - // [126] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← >(const nomodify void*) ppuDataTransfer::ppuData#0 -- _deref_pbuc1=vbuc2 - lda #>ppuData - sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - // [127] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte) 0 -- _deref_pbuc1=vbuc2 - lda #0 - sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - // [128] phi from ppuDataTransfer::ppuDataPrepare1 to ppuDataTransfer::@1 [phi:ppuDataTransfer::ppuDataPrepare1->ppuDataTransfer::@1] - __b1_from_ppuDataPrepare1: - // [128] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*)(const nomodify void*) ppuDataTransfer::cpuData#0 [phi:ppuDataTransfer::ppuDataPrepare1->ppuDataTransfer::@1#0] -- pbuz1=pbuc1 - lda #cpuData - sta.z cpuSrc+1 - // [128] phi (word) ppuDataTransfer::i#2 = (word) 0 [phi:ppuDataTransfer::ppuDataPrepare1->ppuDataTransfer::@1#1] -- vwuz1=vwuc1 - lda #<0 - sta.z i - lda #>0 - sta.z i+1 - jmp __b1 - // ppuDataTransfer::@1 - __b1: - // [129] if((word) ppuDataTransfer::i#2<(const word) ppuDataTransfer::size#0) goto ppuDataTransfer::@2 -- vwuz1_lt_vwuc1_then_la1 - lda.z i+1 - cmp #>size - bcc __b2 - bne !+ - lda.z i - cmp #ppuDataTransfer::@1] - __b1_from___b3: - // [128] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*) ppuDataTransfer::cpuSrc#1 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#0] -- register_copy - // [128] phi (word) ppuDataTransfer::i#2 = (word) ppuDataTransfer::i#1 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#1] -- register_copy - jmp __b1 } // vblank // NMI Called when the PPU refreshes the screen (also known as the V-Blank period) vblank: { - .label __1 = $35 - .label __3 = $36 - .label __5 = $37 - .label __7 = $38 - .label joy = $34 + .label __1 = $5a + .label __3 = $5b + .label __5 = $5c + .label __7 = $5d + .label joy = $59 // entry interrupt(HARDWARE_STACK) pha txa pha tya pha - // [136] call readJoy1 + // [214] call readJoy1 jsr readJoy1 - // [137] (byte) readJoy1::return#2 ← (byte) readJoy1::joy#2 -- vbuz1=vbuz2 + // [215] (byte) readJoy1::return#2 ← (byte) readJoy1::joy#2 -- vbuz1=vbuz2 lda.z readJoy1.joy sta.z readJoy1.return jmp __b11 // vblank::@11 __b11: - // [138] (byte) vblank::joy#0 ← (byte) readJoy1::return#2 -- vbuz1=vbuz2 + // [216] (byte) vblank::joy#0 ← (byte) readJoy1::return#2 -- vbuz1=vbuz2 lda.z readJoy1.return sta.z joy - // [139] (byte~) vblank::$1 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_DOWN -- vbuz1=vbuz2_band_vbuc1 + // [217] (byte~) vblank::$1 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_DOWN -- vbuz1=vbuz2_band_vbuc1 lda #JOY_DOWN and.z joy sta.z __1 - // [140] if((byte) 0==(byte~) vblank::$1) goto vblank::@1 -- vbuc1_eq_vbuz1_then_la1 + // [218] if((byte) 0==(byte~) vblank::$1) goto vblank::@1 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp.z __1 beq __b1 jmp __b5 // vblank::@5 __b5: - // [141] (volatile byte) y_scroll ← ++ (volatile byte) y_scroll -- vbuz1=_inc_vbuz1 + // [219] (volatile byte) y_scroll ← ++ (volatile byte) y_scroll -- vbuz1=_inc_vbuz1 inc.z y_scroll - // [142] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 -- vbuz1_neq_vbuc1_then_la1 + // [220] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$f0 cmp.z y_scroll bne __b1 jmp __b6 // vblank::@6 __b6: - // [143] (volatile byte) y_scroll ← (byte) 0 -- vbuz1=vbuc1 + // [221] (volatile byte) y_scroll ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta.z y_scroll jmp __b1 // vblank::@1 __b1: - // [144] (byte~) vblank::$3 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_UP -- vbuz1=vbuz2_band_vbuc1 + // [222] (byte~) vblank::$3 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_UP -- vbuz1=vbuz2_band_vbuc1 lda #JOY_UP and.z joy sta.z __3 - // [145] if((byte) 0==(byte~) vblank::$3) goto vblank::@2 -- vbuc1_eq_vbuz1_then_la1 + // [223] if((byte) 0==(byte~) vblank::$3) goto vblank::@2 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp.z __3 beq __b2 jmp __b7 // vblank::@7 __b7: - // [146] (volatile byte) y_scroll ← -- (volatile byte) y_scroll -- vbuz1=_dec_vbuz1 + // [224] (volatile byte) y_scroll ← -- (volatile byte) y_scroll -- vbuz1=_dec_vbuz1 dec.z y_scroll - // [147] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 -- vbuz1_neq_vbuc1_then_la1 + // [225] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$ff cmp.z y_scroll bne __b2 jmp __b8 // vblank::@8 __b8: - // [148] (volatile byte) y_scroll ← (byte) $ef -- vbuz1=vbuc1 + // [226] (volatile byte) y_scroll ← (byte) $ef -- vbuz1=vbuc1 lda #$ef sta.z y_scroll jmp __b2 // vblank::@2 __b2: - // [149] (byte~) vblank::$5 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_LEFT -- vbuz1=vbuz2_band_vbuc1 + // [227] (byte~) vblank::$5 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_LEFT -- vbuz1=vbuz2_band_vbuc1 lda #JOY_LEFT and.z joy sta.z __5 - // [150] if((byte) 0==(byte~) vblank::$5) goto vblank::@3 -- vbuc1_eq_vbuz1_then_la1 + // [228] if((byte) 0==(byte~) vblank::$5) goto vblank::@3 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp.z __5 beq __b3 jmp __b9 // vblank::@9 __b9: - // [151] (volatile byte) x_scroll ← ++ (volatile byte) x_scroll -- vbuz1=_inc_vbuz1 + // [229] (volatile byte) x_scroll ← ++ (volatile byte) x_scroll -- vbuz1=_inc_vbuz1 inc.z x_scroll jmp __b3 // vblank::@3 __b3: - // [152] (byte~) vblank::$7 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_RIGHT -- vbuz1=vbuz2_band_vbuc1 + // [230] (byte~) vblank::$7 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_RIGHT -- vbuz1=vbuz2_band_vbuc1 lda #JOY_RIGHT and.z joy sta.z __7 - // [153] if((byte) 0==(byte~) vblank::$7) goto vblank::@4 -- vbuc1_eq_vbuz1_then_la1 + // [231] if((byte) 0==(byte~) vblank::$7) goto vblank::@4 -- vbuc1_eq_vbuz1_then_la1 lda #0 cmp.z __7 beq __b4 jmp __b10 // vblank::@10 __b10: - // [154] (volatile byte) x_scroll ← -- (volatile byte) x_scroll -- vbuz1=_dec_vbuz1 + // [232] (volatile byte) x_scroll ← -- (volatile byte) x_scroll -- vbuz1=_dec_vbuz1 dec.z x_scroll jmp __b4 // vblank::@4 __b4: - // [155] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) x_scroll -- _deref_pbuc1=vbuz1 + // [233] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) x_scroll -- _deref_pbuc1=vbuz1 lda.z x_scroll sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL - // [156] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) y_scroll -- _deref_pbuc1=vbuz1 + // [234] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) y_scroll -- _deref_pbuc1=vbuz1 lda.z y_scroll sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL jmp __breturn // vblank::@return __breturn: - // [157] return - exit interrupt(HARDWARE_STACK) + // [235] return - exit interrupt(HARDWARE_STACK) pla tay pla @@ -3666,61 +5685,69 @@ vblank: { // - bit 6: B // - bit 7: A readJoy1: { - .label __1 = $39 - .label __2 = $3a - .label joy = $1a - .label i = $19 - .label return = $33 - // [158] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 1 -- _deref_pbuc1=vbuc2 + .label __1 = $5e + .label __2 = $5f + .label joy = $30 + .label i = $2f + .label return = $58 + // [236] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 1 -- _deref_pbuc1=vbuc2 // Latch the controller buttons lda #1 sta APU+OFFSET_STRUCT_RICOH_2A03_JOY1 - // [159] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [237] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta APU+OFFSET_STRUCT_RICOH_2A03_JOY1 - // [160] phi from readJoy1 to readJoy1::@1 [phi:readJoy1->readJoy1::@1] + // [238] phi from readJoy1 to readJoy1::@1 [phi:readJoy1->readJoy1::@1] __b1_from_readJoy1: - // [160] phi (byte) readJoy1::joy#2 = (byte) 0 [phi:readJoy1->readJoy1::@1#0] -- vbuz1=vbuc1 + // [238] phi (byte) readJoy1::joy#2 = (byte) 0 [phi:readJoy1->readJoy1::@1#0] -- vbuz1=vbuc1 lda #0 sta.z joy - // [160] phi (byte) readJoy1::i#2 = (byte) 0 [phi:readJoy1->readJoy1::@1#1] -- vbuz1=vbuc1 + // [238] phi (byte) readJoy1::i#2 = (byte) 0 [phi:readJoy1->readJoy1::@1#1] -- vbuz1=vbuc1 lda #0 sta.z i jmp __b1 // readJoy1::@1 __b1: - // [161] if((byte) readJoy1::i#2<(byte) 8) goto readJoy1::@2 -- vbuz1_lt_vbuc1_then_la1 + // [239] if((byte) readJoy1::i#2<(byte) 8) goto readJoy1::@2 -- vbuz1_lt_vbuc1_then_la1 lda.z i cmp #8 bcc __b2 jmp __breturn // readJoy1::@return __breturn: - // [162] return + // [240] return rts // readJoy1::@2 __b2: - // [163] (byte~) readJoy1::$1 ← (byte) readJoy1::joy#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 + // [241] (byte~) readJoy1::$1 ← (byte) readJoy1::joy#2 << (byte) 1 -- vbuz1=vbuz2_rol_1 lda.z joy asl sta.z __1 - // [164] (byte~) readJoy1::$2 ← *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) & (byte) 1 -- vbuz1=_deref_pbuc1_band_vbuc2 + // [242] (byte~) readJoy1::$2 ← *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) & (byte) 1 -- vbuz1=_deref_pbuc1_band_vbuc2 lda #1 and APU+OFFSET_STRUCT_RICOH_2A03_JOY1 sta.z __2 - // [165] (byte) readJoy1::joy#1 ← (byte~) readJoy1::$1 | (byte~) readJoy1::$2 -- vbuz1=vbuz2_bor_vbuz3 + // [243] (byte) readJoy1::joy#1 ← (byte~) readJoy1::$1 | (byte~) readJoy1::$2 -- vbuz1=vbuz2_bor_vbuz3 lda.z __1 ora.z __2 sta.z joy - // [166] (byte) readJoy1::i#1 ← ++ (byte) readJoy1::i#2 -- vbuz1=_inc_vbuz1 + // [244] (byte) readJoy1::i#1 ← ++ (byte) readJoy1::i#2 -- vbuz1=_inc_vbuz1 inc.z i - // [160] phi from readJoy1::@2 to readJoy1::@1 [phi:readJoy1::@2->readJoy1::@1] + // [238] phi from readJoy1::@2 to readJoy1::@1 [phi:readJoy1::@2->readJoy1::@1] __b1_from___b2: - // [160] phi (byte) readJoy1::joy#2 = (byte) readJoy1::joy#1 [phi:readJoy1::@2->readJoy1::@1#0] -- register_copy - // [160] phi (byte) readJoy1::i#2 = (byte) readJoy1::i#1 [phi:readJoy1::@2->readJoy1::@1#1] -- register_copy + // [238] phi (byte) readJoy1::joy#2 = (byte) readJoy1::joy#1 [phi:readJoy1::@2->readJoy1::@1#0] -- register_copy + // [238] phi (byte) readJoy1::i#2 = (byte) readJoy1::i#1 [phi:readJoy1::@2->readJoy1::@1#1] -- register_copy jmp __b1 } // File Data +.segment Data + // The digits used for numbers + DIGITS: .text "0123456789abcdef" + // Values of hexadecimal digits + RADIX_HEXADECIMAL_VALUES_CHAR: .byte $10 +.segment GameRam + num_buffer: .fill $b, 0 + scroll_buffer: .fill $20, 0 .segment Data // Color Palette PALETTE: .byte 1, $21, $f, $30, 1, $21, $f, $30, 1, $21, $f, $30, 1, $21, $f, $30, 1, $f, $30, 8, 1, $f, $18, 8, 1, $30, $37, $1a, $f, $f, $f, $f @@ -3761,52 +5788,79 @@ Statement [26] *((const nomodify byte*) MEMORY+(word) $600 + (byte) main::initNE Statement [27] *((const nomodify byte*) MEMORY+(word) $700 + (byte) main::initNES1_i#2) ← (byte) 0 [ main::initNES1_i#2 ] ( [ main::initNES1_i#2 ] { } main:7 [ main::initNES1_i#2 ] { } ) always clobbers reg byte a Statement [31] (byte~) main::initNES1_waitForVBlank2_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 [ main::initNES1_waitForVBlank2_$0 ] ( [ main::initNES1_waitForVBlank2_$0 ] { } main:7 [ main::initNES1_waitForVBlank2_$0 ] { } ) always clobbers reg byte a Statement asm { ldaPPU_PPUSTATUS } always clobbers reg byte a -Statement [44] (volatile byte) x_scroll ← (byte) 0 [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a -Statement [45] (volatile byte) y_scroll ← (byte) -8 [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a -Statement [46] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a -Statement [47] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a -Statement [51] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#2) [ conio_cursor_x conio_cursor_y conio_line_text cputs::s#2 cputs::c#1 ] ( cputs:43 [ conio_cursor_x conio_cursor_y conio_line_text cputs::s#2 cputs::c#1 ] { } main:7::cputs:43 [ conio_cursor_x conio_cursor_y conio_line_text cputs::s#2 cputs::c#1 ] { } ) always clobbers reg byte a reg byte y -Statement [58] (nomodify byte*) ppuDataSet::ppuData#0 ← (byte*) conio_line_text + (byte) conio_cursor_x [ conio_cursor_x conio_cursor_y conio_line_text cputc::c#0 ppuDataSet::ppuData#0 ] ( cputs:43::cputc:56 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cputc::c#0 ppuDataSet::ppuData#0 ] { { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuDataPrepare1_ppuData#2 } { ppuDataSet::val#0 = ppuDataSet::val#2 cputc::c#0 cputs::c#1 } } main:7::cputs:43::cputc:56 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cputc::c#0 ppuDataSet::ppuData#0 ] { { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuDataPrepare1_ppuData#2 } { ppuDataSet::val#0 = ppuDataSet::val#2 cputc::c#0 cputs::c#1 } } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:36 [ cputc::c#0 ] -Statement [60] (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#2 ← (void*)(nomodify byte*) ppuDataSet::ppuData#0 [ conio_cursor_x conio_cursor_y conio_line_text ppuDataSet::val#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ] ( cputs:43::cputc:56 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataSet::val#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ] { { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuDataPrepare1_ppuData#2 } { ppuDataSet::val#0 = ppuDataSet::val#2 cputc::c#0 cputs::c#1 } } main:7::cputs:43::cputc:56 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataSet::val#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ] { { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuDataPrepare1_ppuData#2 } { ppuDataSet::val#0 = ppuDataSet::val#2 cputc::c#0 cputs::c#1 } } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:13 [ ppuDataSet::val#2 ppuDataSet::val#0 ppuDataSet::val#1 ] -Statement [63] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return [ conio_cursor_x conio_cursor_y conio_line_text ] ( cputs:43::cputc:56 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } ) always clobbers reg byte a -Statement [69] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $20 [ conio_cursor_y conio_line_text ] ( cputs:43::cputc:56::cputln:65 [ cputs::s#0 conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:65 [ cputs::s#0 conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } cputs:43::cputc:56::cputln:68 [ cputs::s#0 conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:68 [ cputs::s#0 conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } ) always clobbers reg byte a -Statement [70] (byte) conio_cursor_x ← (byte) 0 [ conio_cursor_x conio_cursor_y conio_line_text ] ( cputs:43::cputc:56::cputln:65 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:65 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } cputs:43::cputc:56::cputln:68 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:68 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } ) always clobbers reg byte a -Statement [74] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return [ conio_cursor_y conio_line_text ] ( cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } ) always clobbers reg byte a -Statement [79] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $20 [ conio_cursor_y conio_line_text ] ( cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } ) always clobbers reg byte a -Statement [85] (nomodify void*) ppuDataGet::ppuData#0 ← (void*)(byte*) cscroll::line2#2 [ conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 cscroll::x#2 ppuDataGet::ppuData#0 ] ( cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 cscroll::x#2 ppuDataGet::ppuData#0 ] { { cputc::c#0 = cputs::c#1 } { ppuDataGet::return#2 = ppuDataGet::ppuDataRead1_return#0 } } main:7::cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 cscroll::x#2 ppuDataGet::ppuData#0 ] { { cputc::c#0 = cputs::c#1 } { ppuDataGet::return#2 = ppuDataGet::ppuDataRead1_return#0 } } cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 cscroll::x#2 ppuDataGet::ppuData#0 ] { { cputc::c#0 = cputs::c#1 } { ppuDataGet::return#2 = ppuDataGet::ppuDataRead1_return#0 } } main:7::cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 cscroll::x#2 ppuDataGet::ppuData#0 ] { { cputc::c#0 = cputs::c#1 } { ppuDataGet::return#2 = ppuDataGet::ppuDataRead1_return#0 } } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:5 [ cscroll::y#2 cscroll::y#1 ] -Removing always clobbered register reg byte a as potential for zp[1]:10 [ cscroll::x#2 cscroll::x#1 ] -Statement [90] (nomodify void*) ppuDataSet::ppuData#1 ← (void*)(byte*) cscroll::line1#2 [ conio_cursor_y conio_line_text cscroll::y#2 cscroll::line1#2 cscroll::x#2 cscroll::line2#1 cscroll::ch#0 ppuDataSet::ppuData#1 ] ( cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line1#2 cscroll::x#2 cscroll::line2#1 cscroll::ch#0 ppuDataSet::ppuData#1 ] { { cputc::c#0 = cputs::c#1 } { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuData#1 } { ppuDataSet::val#1 = ppuDataSet::val#2 cscroll::ch#0 } } main:7::cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line1#2 cscroll::x#2 cscroll::line2#1 cscroll::ch#0 ppuDataSet::ppuData#1 ] { { cputc::c#0 = cputs::c#1 } { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuData#1 } { ppuDataSet::val#1 = ppuDataSet::val#2 cscroll::ch#0 } } cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line1#2 cscroll::x#2 cscroll::line2#1 cscroll::ch#0 ppuDataSet::ppuData#1 ] { { cputc::c#0 = cputs::c#1 } { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuData#1 } { ppuDataSet::val#1 = ppuDataSet::val#2 cscroll::ch#0 } } main:7::cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line1#2 cscroll::x#2 cscroll::line2#1 cscroll::ch#0 ppuDataSet::ppuData#1 ] { { cputc::c#0 = cputs::c#1 } { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuData#1 } { ppuDataSet::val#1 = ppuDataSet::val#2 cscroll::ch#0 } } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:42 [ cscroll::ch#0 ] -Statement [115] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#5) goto ppuDataFill::ppuDataPut1 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] ( ppuDataFill:37 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } main:7::ppuDataFill:37 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } ppuDataFill:39 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } main:7::ppuDataFill:39 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } cputs:43::cputc:56::cputln:65::cscroll:72::ppuDataFill:78 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:65::cscroll:72::ppuDataFill:78 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputc::c#0 = cputs::c#1 } } cputs:43::cputc:56::cputln:68::cscroll:72::ppuDataFill:78 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:68::cscroll:72::ppuDataFill:78 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputc::c#0 = cputs::c#1 } } clrscr:41::ppuDataFill:120 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } main:7::clrscr:41::ppuDataFill:120 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:18 [ ppuDataFill::val#10 ] -Statement [121] (byte) conio_cursor_x ← (byte) 0 [ conio_cursor_x ] ( clrscr:41 [ conio_cursor_x ] { } main:7::clrscr:41 [ conio_cursor_x ] { } ) always clobbers reg byte a -Statement [122] (byte) conio_cursor_y ← (byte) 0 [ conio_cursor_x conio_cursor_y ] ( clrscr:41 [ conio_cursor_x conio_cursor_y ] { } main:7::clrscr:41 [ conio_cursor_x conio_cursor_y ] { } ) always clobbers reg byte a -Statement [123] (byte*) conio_line_text ← (const nomodify byte*) PPU_NAME_TABLE_0 [ conio_cursor_x conio_cursor_y conio_line_text ] ( clrscr:41 [ conio_cursor_x conio_cursor_y conio_line_text ] { } main:7::clrscr:41 [ conio_cursor_x conio_cursor_y conio_line_text ] { } ) always clobbers reg byte a -Statement [126] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← >(const nomodify void*) ppuDataTransfer::ppuData#0 [ ] ( ppuDataTransfer:35 [ ] { } main:7::ppuDataTransfer:35 [ ] { } ) always clobbers reg byte a -Statement [127] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte) 0 [ ] ( ppuDataTransfer:35 [ ] { } main:7::ppuDataTransfer:35 [ ] { } ) always clobbers reg byte a -Statement [129] if((word) ppuDataTransfer::i#2<(const word) ppuDataTransfer::size#0) goto ppuDataTransfer::@2 [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] ( ppuDataTransfer:35 [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } main:7::ppuDataTransfer:35 [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } ) always clobbers reg byte a -Statement [131] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] ( ppuDataTransfer:35 [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } main:7::ppuDataTransfer:35 [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } ) always clobbers reg byte a reg byte y -Statement [139] (byte~) vblank::$1 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_DOWN [ x_scroll y_scroll vblank::joy#0 vblank::$1 ] ( [ x_scroll y_scroll vblank::joy#0 vblank::$1 ] { } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:52 [ vblank::joy#0 ] -Statement [142] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a -Statement [143] (volatile byte) y_scroll ← (byte) 0 [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a -Statement [144] (byte~) vblank::$3 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_UP [ x_scroll y_scroll vblank::joy#0 vblank::$3 ] ( [ x_scroll y_scroll vblank::joy#0 vblank::$3 ] { } ) always clobbers reg byte a -Statement [147] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a -Statement [148] (volatile byte) y_scroll ← (byte) $ef [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a -Statement [149] (byte~) vblank::$5 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_LEFT [ x_scroll y_scroll vblank::joy#0 vblank::$5 ] ( [ x_scroll y_scroll vblank::joy#0 vblank::$5 ] { } ) always clobbers reg byte a -Statement [152] (byte~) vblank::$7 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_RIGHT [ x_scroll y_scroll vblank::$7 ] ( [ x_scroll y_scroll vblank::$7 ] { } ) always clobbers reg byte a -Statement [155] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) x_scroll [ y_scroll ] ( [ y_scroll ] { } ) always clobbers reg byte a -Statement [156] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) y_scroll [ ] ( [ ] { } ) always clobbers reg byte a -Statement [157] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y -Statement [158] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 1 [ ] ( readJoy1:136 [ x_scroll y_scroll ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a -Statement [159] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 0 [ ] ( readJoy1:136 [ x_scroll y_scroll ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a -Statement [163] (byte~) readJoy1::$1 ← (byte) readJoy1::joy#2 << (byte) 1 [ readJoy1::i#2 readJoy1::$1 ] ( readJoy1:136 [ x_scroll y_scroll readJoy1::i#2 readJoy1::$1 ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:25 [ readJoy1::i#2 readJoy1::i#1 ] -Statement [164] (byte~) readJoy1::$2 ← *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) & (byte) 1 [ readJoy1::i#2 readJoy1::$1 readJoy1::$2 ] ( readJoy1:136 [ x_scroll y_scroll readJoy1::i#2 readJoy1::$1 readJoy1::$2 ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a -Removing always clobbered register reg byte a as potential for zp[1]:57 [ readJoy1::$1 ] +Statement [48] (volatile byte) x_scroll ← (byte) 0 [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a +Statement [49] (volatile byte) y_scroll ← (byte) -8 [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a +Statement [50] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a +Statement [51] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a +Statement [53] (byte) uctoa::value#1 ← (byte) main::i#2 & (byte) $f [ main::i#2 uctoa::value#1 ] ( [ main::i#2 uctoa::value#1 ] { } main:7 [ main::i#2 uctoa::value#1 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:5 [ main::i#2 main::i#1 ] +Statement [80] (nomodify byte*) ppuDataSet::ppuData#0 ← (byte*) conio_line_text + (byte) conio_cursor_x [ conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] ( cputcxy:60::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } main:7::cputcxy:60::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } cputcxy:63::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } main:7::cputcxy:63::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } cputcxy:66::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } main:7::cputcxy:66::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } cputcxy:69::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } main:7::cputcxy:69::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } cputsxy:57::cputs:171::cputc:180 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 ppuDataSet::val#0 } } main:7::cputsxy:57::cputs:171::cputc:180 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 ppuDataSet::val#0 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:4 [ main::y#10 main::y#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:9 [ cputc::c#2 cputc::c#1 cputc::c#0 ] +Removing always clobbered register reg byte a as potential for zp[1]:3 [ main::x#10 main::x#1 ] +Statement [84] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return [ conio_cursor_x conio_cursor_y conio_line_text ] ( cputcxy:60::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [90] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $20 [ conio_cursor_y conio_line_text ] ( cputcxy:60::cputc:76::cputln:86 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86 [ main::i#2 cputs::s#0 conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86 [ main::i#2 cputs::s#0 conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89 [ main::i#2 cputs::s#0 conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89 [ main::i#2 cputs::s#0 conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [91] (byte) conio_cursor_x ← (byte) 0 [ conio_cursor_x conio_cursor_y conio_line_text ] ( cputcxy:60::cputc:76::cputln:86 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [95] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return [ conio_cursor_y conio_line_text ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [100] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $20 [ conio_cursor_y conio_line_text ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [103] (nomodify void*) ppuDataFetch::ppuData#0 ← (void*)(byte*) cscroll::line2#2 [ conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:10 [ cscroll::y#2 cscroll::y#1 ] +Statement [105] (nomodify void*) ppuDataTransfer::ppuData#0 ← (void*)(byte*) cscroll::line1#2 [ conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } ) always clobbers reg byte a +Statement [107] (byte*) cscroll::line1#1 ← (byte*) cscroll::line1#2 + (byte) $20 [ conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [108] (byte*) cscroll::line2#1 ← (byte*) cscroll::line2#2 + (byte) $20 [ conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [115] (byte*) ppuDataTransfer::cpuSrc#6 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 [ ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] ( ppuDataTransfer:35 [ ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { } main:7::ppuDataTransfer:35 [ ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { } cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } ) always clobbers reg byte a +Statement [117] if((word) ppuDataTransfer::i#2<(word) ppuDataTransfer::size#3) goto ppuDataTransfer::@2 [ ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] ( ppuDataTransfer:35 [ ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } main:7::ppuDataTransfer:35 [ ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } ) always clobbers reg byte a +Statement [119] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) [ ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] ( ppuDataTransfer:35 [ ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } main:7::ppuDataTransfer:35 [ ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:4 [ main::y#10 main::y#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:10 [ cscroll::y#2 cscroll::y#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:3 [ main::x#10 main::x#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:5 [ main::i#2 main::i#1 ] +Statement asm { ldaPPU_PPUDATA } always clobbers reg byte a +Statement [130] if((word) ppuDataFetch::i#2<(const word) ppuDataFetch::size#0) goto ppuDataFetch::ppuDataRead1 [ ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [133] *((byte*) ppuDataFetch::cpuDst#2) ← (byte) ppuDataFetch::ppuDataRead1_return#0 [ ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte y +Statement [142] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#5) goto ppuDataFill::ppuDataPut1 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] ( ppuDataFill:37 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } main:7::ppuDataFill:37 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } ppuDataFill:39 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } main:7::ppuDataFill:39 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataFill:99 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataFill:99 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataFill:99 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataFill:99 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } clrscr:41::ppuDataFill:208 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } main:7::clrscr:41::ppuDataFill:208 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:33 [ ppuDataFill::val#10 ] +Statement [162] (word~) gotoxy::$6 ← (word)(byte) gotoxy::y#5 [ conio_cursor_x conio_cursor_y gotoxy::$6 ] ( cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } main:7::cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } main:7::cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } main:7::cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:8 [ cputcxy::c#4 ] +Statement [163] (word) gotoxy::line_offset#0 ← (word~) gotoxy::$6 << (byte) 5 [ conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] ( cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } main:7::cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } main:7::cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } main:7::cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } ) always clobbers reg byte a +Statement [164] (byte*~) gotoxy::$5 ← (const nomodify byte*) PPU_NAME_TABLE_0 + (word) gotoxy::line_offset#0 [ conio_cursor_x conio_cursor_y gotoxy::$5 ] ( cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } main:7::cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } main:7::cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } main:7::cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } ) always clobbers reg byte a +Statement [165] (byte*) conio_line_text ← (byte*~) gotoxy::$5 [ conio_cursor_x conio_cursor_y conio_line_text ] ( cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } main:7::cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } main:7::cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } main:7::cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } ) always clobbers reg byte a +Statement [175] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#2) [ conio_cursor_x conio_cursor_y conio_line_text cputs::s#2 cputs::c#1 ] ( cputsxy:57::cputs:171 [ main::i#2 conio_cursor_x conio_cursor_y conio_line_text cputs::s#2 cputs::c#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } } main:7::cputsxy:57::cputs:171 [ main::i#2 conio_cursor_x conio_cursor_y conio_line_text cputs::s#2 cputs::c#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } } ) always clobbers reg byte a reg byte y +Statement [184] *((byte*) uctoa::buffer#11) ← *((const byte*) DIGITS + (byte) uctoa::value#2) [ uctoa::buffer#11 ] ( uctoa:54 [ main::i#2 uctoa::buffer#11 ] { } main:7::uctoa:54 [ main::i#2 uctoa::buffer#11 ] { } ) always clobbers reg byte a reg byte y +Statement [185] (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#11 [ uctoa::buffer#3 ] ( uctoa:54 [ main::i#2 uctoa::buffer#3 ] { } main:7::uctoa:54 [ main::i#2 uctoa::buffer#3 ] { } ) always clobbers reg byte a +Statement [186] *((byte*) uctoa::buffer#3) ← (byte) 0 [ ] ( uctoa:54 [ main::i#2 ] { } main:7::uctoa:54 [ main::i#2 ] { } ) always clobbers reg byte a reg byte y +Statement [193] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#11 [ uctoa::digit#2 uctoa::value#2 uctoa::buffer#11 uctoa::digit_value#0 uctoa_append::buffer#0 ] ( uctoa:54 [ main::i#2 uctoa::digit#2 uctoa::value#2 uctoa::buffer#11 uctoa::digit_value#0 uctoa_append::buffer#0 ] { { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } main:7::uctoa:54 [ main::i#2 uctoa::digit#2 uctoa::value#2 uctoa::buffer#11 uctoa::digit_value#0 uctoa_append::buffer#0 ] { { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:40 [ uctoa::digit#2 uctoa::digit#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:41 [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ] +Removing always clobbered register reg byte a as potential for zp[1]:83 [ uctoa::digit_value#0 ] +Statement [203] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2) [ uctoa_append::value#2 ] ( uctoa:54::uctoa_append:196 [ main::i#2 uctoa::digit#2 uctoa::buffer#11 uctoa_append::value#2 ] { { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } main:7::uctoa:54::uctoa_append:196 [ main::i#2 uctoa::digit#2 uctoa::buffer#11 uctoa_append::value#2 ] { { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } ) always clobbers reg byte a reg byte y +Removing always clobbered register reg byte y as potential for zp[1]:40 [ uctoa::digit#2 uctoa::digit#1 ] +Removing always clobbered register reg byte a as potential for zp[1]:45 [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ] +Removing always clobbered register reg byte y as potential for zp[1]:45 [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ] +Statement [206] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0 [ uctoa_append::buffer#0 uctoa_append::sub#0 uctoa_append::value#1 uctoa_append::digit#1 ] ( uctoa:54::uctoa_append:196 [ main::i#2 uctoa::digit#2 uctoa::buffer#11 uctoa_append::buffer#0 uctoa_append::sub#0 uctoa_append::value#1 uctoa_append::digit#1 ] { { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } main:7::uctoa:54::uctoa_append:196 [ main::i#2 uctoa::digit#2 uctoa::buffer#11 uctoa_append::buffer#0 uctoa_append::sub#0 uctoa_append::value#1 uctoa_append::digit#1 ] { { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:86 [ uctoa_append::sub#0 ] +Removing always clobbered register reg byte a as potential for zp[1]:46 [ uctoa_append::digit#2 uctoa_append::digit#1 ] +Statement [209] (byte) conio_cursor_x ← (byte) 0 [ ] ( clrscr:41 [ ] { } main:7::clrscr:41 [ ] { } ) always clobbers reg byte a +Statement [210] (byte) conio_cursor_y ← (byte) 0 [ ] ( clrscr:41 [ ] { } main:7::clrscr:41 [ ] { } ) always clobbers reg byte a +Statement [211] (byte*) conio_line_text ← (const nomodify byte*) PPU_NAME_TABLE_0 [ ] ( clrscr:41 [ ] { } main:7::clrscr:41 [ ] { } ) always clobbers reg byte a +Statement [217] (byte~) vblank::$1 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_DOWN [ x_scroll y_scroll vblank::joy#0 vblank::$1 ] ( [ x_scroll y_scroll vblank::joy#0 vblank::$1 ] { } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:89 [ vblank::joy#0 ] +Statement [220] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a +Statement [221] (volatile byte) y_scroll ← (byte) 0 [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a +Statement [222] (byte~) vblank::$3 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_UP [ x_scroll y_scroll vblank::joy#0 vblank::$3 ] ( [ x_scroll y_scroll vblank::joy#0 vblank::$3 ] { } ) always clobbers reg byte a +Statement [225] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a +Statement [226] (volatile byte) y_scroll ← (byte) $ef [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a +Statement [227] (byte~) vblank::$5 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_LEFT [ x_scroll y_scroll vblank::joy#0 vblank::$5 ] ( [ x_scroll y_scroll vblank::joy#0 vblank::$5 ] { } ) always clobbers reg byte a +Statement [230] (byte~) vblank::$7 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_RIGHT [ x_scroll y_scroll vblank::$7 ] ( [ x_scroll y_scroll vblank::$7 ] { } ) always clobbers reg byte a +Statement [233] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) x_scroll [ y_scroll ] ( [ y_scroll ] { } ) always clobbers reg byte a +Statement [234] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) y_scroll [ ] ( [ ] { } ) always clobbers reg byte a +Statement [235] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y +Statement [236] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 1 [ ] ( readJoy1:214 [ x_scroll y_scroll ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a +Statement [237] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 0 [ ] ( readJoy1:214 [ x_scroll y_scroll ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a +Statement [241] (byte~) readJoy1::$1 ← (byte) readJoy1::joy#2 << (byte) 1 [ readJoy1::i#2 readJoy1::$1 ] ( readJoy1:214 [ x_scroll y_scroll readJoy1::i#2 readJoy1::$1 ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:47 [ readJoy1::i#2 readJoy1::i#1 ] +Statement [242] (byte~) readJoy1::$2 ← *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) & (byte) 1 [ readJoy1::i#2 readJoy1::$1 readJoy1::$2 ] ( readJoy1:214 [ x_scroll y_scroll readJoy1::i#2 readJoy1::$1 readJoy1::$2 ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a +Removing always clobbered register reg byte a as potential for zp[1]:94 [ readJoy1::$1 ] Statement [1] (byte) conio_cursor_x ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [2] (byte) conio_cursor_y ← (byte) 0 [ ] ( [ ] { } ) always clobbers reg byte a Statement [3] (byte*) conio_line_text ← (const nomodify byte*) PPU_NAME_TABLE_0 [ ] ( [ ] { } ) always clobbers reg byte a @@ -3829,160 +5883,249 @@ Statement [26] *((const nomodify byte*) MEMORY+(word) $600 + (byte) main::initNE Statement [27] *((const nomodify byte*) MEMORY+(word) $700 + (byte) main::initNES1_i#2) ← (byte) 0 [ main::initNES1_i#2 ] ( [ main::initNES1_i#2 ] { } main:7 [ main::initNES1_i#2 ] { } ) always clobbers reg byte a Statement [31] (byte~) main::initNES1_waitForVBlank2_$0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSTATUS) & (byte) $80 [ main::initNES1_waitForVBlank2_$0 ] ( [ main::initNES1_waitForVBlank2_$0 ] { } main:7 [ main::initNES1_waitForVBlank2_$0 ] { } ) always clobbers reg byte a Statement asm { ldaPPU_PPUSTATUS } always clobbers reg byte a -Statement [44] (volatile byte) x_scroll ← (byte) 0 [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a -Statement [45] (volatile byte) y_scroll ← (byte) -8 [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a -Statement [46] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a -Statement [47] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a -Statement [51] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#2) [ conio_cursor_x conio_cursor_y conio_line_text cputs::s#2 cputs::c#1 ] ( cputs:43 [ conio_cursor_x conio_cursor_y conio_line_text cputs::s#2 cputs::c#1 ] { } main:7::cputs:43 [ conio_cursor_x conio_cursor_y conio_line_text cputs::s#2 cputs::c#1 ] { } ) always clobbers reg byte a reg byte y -Statement [58] (nomodify byte*) ppuDataSet::ppuData#0 ← (byte*) conio_line_text + (byte) conio_cursor_x [ conio_cursor_x conio_cursor_y conio_line_text cputc::c#0 ppuDataSet::ppuData#0 ] ( cputs:43::cputc:56 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cputc::c#0 ppuDataSet::ppuData#0 ] { { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuDataPrepare1_ppuData#2 } { ppuDataSet::val#0 = ppuDataSet::val#2 cputc::c#0 cputs::c#1 } } main:7::cputs:43::cputc:56 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cputc::c#0 ppuDataSet::ppuData#0 ] { { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuDataPrepare1_ppuData#2 } { ppuDataSet::val#0 = ppuDataSet::val#2 cputc::c#0 cputs::c#1 } } ) always clobbers reg byte a -Statement [60] (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#2 ← (void*)(nomodify byte*) ppuDataSet::ppuData#0 [ conio_cursor_x conio_cursor_y conio_line_text ppuDataSet::val#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ] ( cputs:43::cputc:56 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataSet::val#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ] { { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuDataPrepare1_ppuData#2 } { ppuDataSet::val#0 = ppuDataSet::val#2 cputc::c#0 cputs::c#1 } } main:7::cputs:43::cputc:56 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataSet::val#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ] { { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuDataPrepare1_ppuData#2 } { ppuDataSet::val#0 = ppuDataSet::val#2 cputc::c#0 cputs::c#1 } } ) always clobbers reg byte a -Statement [63] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return [ conio_cursor_x conio_cursor_y conio_line_text ] ( cputs:43::cputc:56 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } ) always clobbers reg byte a -Statement [69] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $20 [ conio_cursor_y conio_line_text ] ( cputs:43::cputc:56::cputln:65 [ cputs::s#0 conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:65 [ cputs::s#0 conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } cputs:43::cputc:56::cputln:68 [ cputs::s#0 conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:68 [ cputs::s#0 conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } ) always clobbers reg byte a -Statement [70] (byte) conio_cursor_x ← (byte) 0 [ conio_cursor_x conio_cursor_y conio_line_text ] ( cputs:43::cputc:56::cputln:65 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:65 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } cputs:43::cputc:56::cputln:68 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:68 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } ) always clobbers reg byte a -Statement [74] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return [ conio_cursor_y conio_line_text ] ( cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } ) always clobbers reg byte a -Statement [79] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $20 [ conio_cursor_y conio_line_text ] ( cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputc::c#0 = cputs::c#1 } } ) always clobbers reg byte a -Statement [85] (nomodify void*) ppuDataGet::ppuData#0 ← (void*)(byte*) cscroll::line2#2 [ conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 cscroll::x#2 ppuDataGet::ppuData#0 ] ( cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 cscroll::x#2 ppuDataGet::ppuData#0 ] { { cputc::c#0 = cputs::c#1 } { ppuDataGet::return#2 = ppuDataGet::ppuDataRead1_return#0 } } main:7::cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 cscroll::x#2 ppuDataGet::ppuData#0 ] { { cputc::c#0 = cputs::c#1 } { ppuDataGet::return#2 = ppuDataGet::ppuDataRead1_return#0 } } cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 cscroll::x#2 ppuDataGet::ppuData#0 ] { { cputc::c#0 = cputs::c#1 } { ppuDataGet::return#2 = ppuDataGet::ppuDataRead1_return#0 } } main:7::cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 cscroll::x#2 ppuDataGet::ppuData#0 ] { { cputc::c#0 = cputs::c#1 } { ppuDataGet::return#2 = ppuDataGet::ppuDataRead1_return#0 } } ) always clobbers reg byte a -Statement [90] (nomodify void*) ppuDataSet::ppuData#1 ← (void*)(byte*) cscroll::line1#2 [ conio_cursor_y conio_line_text cscroll::y#2 cscroll::line1#2 cscroll::x#2 cscroll::line2#1 cscroll::ch#0 ppuDataSet::ppuData#1 ] ( cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line1#2 cscroll::x#2 cscroll::line2#1 cscroll::ch#0 ppuDataSet::ppuData#1 ] { { cputc::c#0 = cputs::c#1 } { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuData#1 } { ppuDataSet::val#1 = ppuDataSet::val#2 cscroll::ch#0 } } main:7::cputs:43::cputc:56::cputln:65::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line1#2 cscroll::x#2 cscroll::line2#1 cscroll::ch#0 ppuDataSet::ppuData#1 ] { { cputc::c#0 = cputs::c#1 } { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuData#1 } { ppuDataSet::val#1 = ppuDataSet::val#2 cscroll::ch#0 } } cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line1#2 cscroll::x#2 cscroll::line2#1 cscroll::ch#0 ppuDataSet::ppuData#1 ] { { cputc::c#0 = cputs::c#1 } { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuData#1 } { ppuDataSet::val#1 = ppuDataSet::val#2 cscroll::ch#0 } } main:7::cputs:43::cputc:56::cputln:68::cscroll:72 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line1#2 cscroll::x#2 cscroll::line2#1 cscroll::ch#0 ppuDataSet::ppuData#1 ] { { cputc::c#0 = cputs::c#1 } { ppuDataSet::ppuDataPrepare1_ppuData#0 = ppuDataSet::ppuData#1 } { ppuDataSet::val#1 = ppuDataSet::val#2 cscroll::ch#0 } } ) always clobbers reg byte a -Statement [115] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#5) goto ppuDataFill::ppuDataPut1 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] ( ppuDataFill:37 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } main:7::ppuDataFill:37 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } ppuDataFill:39 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } main:7::ppuDataFill:39 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } cputs:43::cputc:56::cputln:65::cscroll:72::ppuDataFill:78 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:65::cscroll:72::ppuDataFill:78 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputc::c#0 = cputs::c#1 } } cputs:43::cputc:56::cputln:68::cscroll:72::ppuDataFill:78 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputc::c#0 = cputs::c#1 } } main:7::cputs:43::cputc:56::cputln:68::cscroll:72::ppuDataFill:78 [ cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputc::c#0 = cputs::c#1 } } clrscr:41::ppuDataFill:120 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } main:7::clrscr:41::ppuDataFill:120 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } ) always clobbers reg byte a -Statement [121] (byte) conio_cursor_x ← (byte) 0 [ conio_cursor_x ] ( clrscr:41 [ conio_cursor_x ] { } main:7::clrscr:41 [ conio_cursor_x ] { } ) always clobbers reg byte a -Statement [122] (byte) conio_cursor_y ← (byte) 0 [ conio_cursor_x conio_cursor_y ] ( clrscr:41 [ conio_cursor_x conio_cursor_y ] { } main:7::clrscr:41 [ conio_cursor_x conio_cursor_y ] { } ) always clobbers reg byte a -Statement [123] (byte*) conio_line_text ← (const nomodify byte*) PPU_NAME_TABLE_0 [ conio_cursor_x conio_cursor_y conio_line_text ] ( clrscr:41 [ conio_cursor_x conio_cursor_y conio_line_text ] { } main:7::clrscr:41 [ conio_cursor_x conio_cursor_y conio_line_text ] { } ) always clobbers reg byte a -Statement [126] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← >(const nomodify void*) ppuDataTransfer::ppuData#0 [ ] ( ppuDataTransfer:35 [ ] { } main:7::ppuDataTransfer:35 [ ] { } ) always clobbers reg byte a -Statement [127] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte) 0 [ ] ( ppuDataTransfer:35 [ ] { } main:7::ppuDataTransfer:35 [ ] { } ) always clobbers reg byte a -Statement [129] if((word) ppuDataTransfer::i#2<(const word) ppuDataTransfer::size#0) goto ppuDataTransfer::@2 [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] ( ppuDataTransfer:35 [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } main:7::ppuDataTransfer:35 [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } ) always clobbers reg byte a -Statement [131] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] ( ppuDataTransfer:35 [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } main:7::ppuDataTransfer:35 [ ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } ) always clobbers reg byte a reg byte y -Statement [139] (byte~) vblank::$1 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_DOWN [ x_scroll y_scroll vblank::joy#0 vblank::$1 ] ( [ x_scroll y_scroll vblank::joy#0 vblank::$1 ] { } ) always clobbers reg byte a -Statement [142] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a -Statement [143] (volatile byte) y_scroll ← (byte) 0 [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a -Statement [144] (byte~) vblank::$3 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_UP [ x_scroll y_scroll vblank::joy#0 vblank::$3 ] ( [ x_scroll y_scroll vblank::joy#0 vblank::$3 ] { } ) always clobbers reg byte a -Statement [147] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a -Statement [148] (volatile byte) y_scroll ← (byte) $ef [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a -Statement [149] (byte~) vblank::$5 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_LEFT [ x_scroll y_scroll vblank::joy#0 vblank::$5 ] ( [ x_scroll y_scroll vblank::joy#0 vblank::$5 ] { } ) always clobbers reg byte a -Statement [152] (byte~) vblank::$7 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_RIGHT [ x_scroll y_scroll vblank::$7 ] ( [ x_scroll y_scroll vblank::$7 ] { } ) always clobbers reg byte a -Statement [155] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) x_scroll [ y_scroll ] ( [ y_scroll ] { } ) always clobbers reg byte a -Statement [156] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) y_scroll [ ] ( [ ] { } ) always clobbers reg byte a -Statement [157] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y -Statement [158] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 1 [ ] ( readJoy1:136 [ x_scroll y_scroll ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a -Statement [159] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 0 [ ] ( readJoy1:136 [ x_scroll y_scroll ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a -Statement [163] (byte~) readJoy1::$1 ← (byte) readJoy1::joy#2 << (byte) 1 [ readJoy1::i#2 readJoy1::$1 ] ( readJoy1:136 [ x_scroll y_scroll readJoy1::i#2 readJoy1::$1 ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a -Statement [164] (byte~) readJoy1::$2 ← *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) & (byte) 1 [ readJoy1::i#2 readJoy1::$1 readJoy1::$2 ] ( readJoy1:136 [ x_scroll y_scroll readJoy1::i#2 readJoy1::$1 readJoy1::$2 ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a +Statement [48] (volatile byte) x_scroll ← (byte) 0 [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a +Statement [49] (volatile byte) y_scroll ← (byte) -8 [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a +Statement [50] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a +Statement [51] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e [ ] ( [ ] { } main:7 [ ] { } ) always clobbers reg byte a +Statement [53] (byte) uctoa::value#1 ← (byte) main::i#2 & (byte) $f [ main::i#2 uctoa::value#1 ] ( [ main::i#2 uctoa::value#1 ] { } main:7 [ main::i#2 uctoa::value#1 ] { } ) always clobbers reg byte a +Statement [80] (nomodify byte*) ppuDataSet::ppuData#0 ← (byte*) conio_line_text + (byte) conio_cursor_x [ conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] ( cputcxy:60::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } main:7::cputcxy:60::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } cputcxy:63::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } main:7::cputcxy:63::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } cputcxy:66::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } main:7::cputcxy:66::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } cputcxy:69::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } main:7::cputcxy:69::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 ppuDataSet::val#0 } } cputsxy:57::cputs:171::cputc:180 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 ppuDataSet::val#0 } } main:7::cputsxy:57::cputs:171::cputc:180 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cputc::c#2 ppuDataSet::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 ppuDataSet::val#0 } } ) always clobbers reg byte a +Statement [84] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return [ conio_cursor_x conio_cursor_y conio_line_text ] ( cputcxy:60::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [90] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $20 [ conio_cursor_y conio_line_text ] ( cputcxy:60::cputc:76::cputln:86 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86 [ main::i#2 cputs::s#0 conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86 [ main::i#2 cputs::s#0 conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89 [ main::y#10 conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89 [ main::x#10 conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89 [ main::i#2 cputs::s#0 conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89 [ main::i#2 cputs::s#0 conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [91] (byte) conio_cursor_x ← (byte) 0 [ conio_cursor_x conio_cursor_y conio_line_text ] ( cputcxy:60::cputc:76::cputln:86 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [95] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return [ conio_cursor_y conio_line_text ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [100] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $20 [ conio_cursor_y conio_line_text ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [103] (nomodify void*) ppuDataFetch::ppuData#0 ← (void*)(byte*) cscroll::line2#2 [ conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [105] (nomodify void*) ppuDataTransfer::ppuData#0 ← (void*)(byte*) cscroll::line1#2 [ conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::ppuData#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } ) always clobbers reg byte a +Statement [107] (byte*) cscroll::line1#1 ← (byte*) cscroll::line1#2 + (byte) $20 [ conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [108] (byte*) cscroll::line2#1 ← (byte*) cscroll::line2#2 + (byte) $20 [ conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#1 cscroll::line1#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [115] (byte*) ppuDataTransfer::cpuSrc#6 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 [ ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] ( ppuDataTransfer:35 [ ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { } main:7::ppuDataTransfer:35 [ ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { } cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::cpuSrc#6 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } ) always clobbers reg byte a +Statement [117] if((word) ppuDataTransfer::i#2<(word) ppuDataTransfer::size#3) goto ppuDataTransfer::@2 [ ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] ( ppuDataTransfer:35 [ ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } main:7::ppuDataTransfer:35 [ ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { } cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } ) always clobbers reg byte a +Statement [119] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) [ ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] ( ppuDataTransfer:35 [ ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } main:7::ppuDataTransfer:35 [ ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { } cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataTransfer:106 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataTransfer::size#3 ppuDataTransfer::i#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::ppuDataPut1_val#0 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } { ppuDataTransfer::ppuDataPrepare1_ppuData#0 = ppuDataTransfer::ppuData#0 } } ) always clobbers reg byte a reg byte y +Statement asm { ldaPPU_PPUDATA } always clobbers reg byte a +Statement [130] if((word) ppuDataFetch::i#2<(const word) ppuDataFetch::size#0) goto ppuDataFetch::ppuDataRead1 [ ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte a +Statement [133] *((byte*) ppuDataFetch::cpuDst#2) ← (byte) ppuDataFetch::ppuDataRead1_return#0 [ ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] ( cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataFetch:104 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataFetch:104 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text cscroll::y#2 cscroll::line2#2 cscroll::line1#2 ppuDataFetch::i#2 ppuDataFetch::cpuDst#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } ) always clobbers reg byte y +Statement [142] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#5) goto ppuDataFill::ppuDataPut1 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] ( ppuDataFill:37 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } main:7::ppuDataFill:37 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } ppuDataFill:39 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } main:7::ppuDataFill:39 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:86::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataFill:99 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:86::cscroll:93::ppuDataFill:99 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:60::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#2 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:63::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::y#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::y#3 = cputcxy::y#4 main::y#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:66::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#0 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } main:7::cputcxy:69::cputc:76::cputln:89::cscroll:93::ppuDataFill:99 [ main::x#10 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputcxy::x#1 = cputcxy::x#4 main::x#10 } { cputc::c#1 = cputc::c#2 cputcxy::c#4 } } cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataFill:99 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } main:7::cputsxy:57::cputs:171::cputc:180::cputln:89::cscroll:93::ppuDataFill:99 [ main::i#2 cputs::s#0 conio_cursor_x conio_cursor_y conio_line_text ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } { cputc::c#0 = cputc::c#2 cputs::c#1 } } clrscr:41::ppuDataFill:208 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } main:7::clrscr:41::ppuDataFill:208 [ ppuDataFill::size#5 ppuDataFill::val#10 ppuDataFill::i#2 ] { } ) always clobbers reg byte a +Statement [162] (word~) gotoxy::$6 ← (word)(byte) gotoxy::y#5 [ conio_cursor_x conio_cursor_y gotoxy::$6 ] ( cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } main:7::cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } main:7::cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } main:7::cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y gotoxy::$6 ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } ) always clobbers reg byte a +Statement [163] (word) gotoxy::line_offset#0 ← (word~) gotoxy::$6 << (byte) 5 [ conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] ( cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } main:7::cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } main:7::cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } main:7::cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y gotoxy::line_offset#0 ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } ) always clobbers reg byte a +Statement [164] (byte*~) gotoxy::$5 ← (const nomodify byte*) PPU_NAME_TABLE_0 + (word) gotoxy::line_offset#0 [ conio_cursor_x conio_cursor_y gotoxy::$5 ] ( cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } main:7::cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } main:7::cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } main:7::cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y gotoxy::$5 ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } ) always clobbers reg byte a +Statement [165] (byte*) conio_line_text ← (byte*~) gotoxy::$5 [ conio_cursor_x conio_cursor_y conio_line_text ] ( cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:60::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#2 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } main:7::cputcxy:63::gotoxy:74 [ main::y#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 cputcxy::y#3 main::y#10 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 } } cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } main:7::cputcxy:66::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#0 main::x#10 } } cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } main:7::cputcxy:69::gotoxy:74 [ main::x#10 cputcxy::c#4 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::y#2 = gotoxy::y#4 cputcxy::y#4 } { gotoxy::x#2 = gotoxy::x#4 cputcxy::x#4 cputcxy::x#1 main::x#10 } } cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } main:7::cputsxy:57::gotoxy:169 [ main::i#2 conio_cursor_x conio_cursor_y conio_line_text ] { { gotoxy::x#3 = gotoxy::x#4 gotoxy::y#4 gotoxy::y#3 cputsxy::x#0 main::i#2 cputsxy::y#0 } } ) always clobbers reg byte a +Statement [175] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#2) [ conio_cursor_x conio_cursor_y conio_line_text cputs::s#2 cputs::c#1 ] ( cputsxy:57::cputs:171 [ main::i#2 conio_cursor_x conio_cursor_y conio_line_text cputs::s#2 cputs::c#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } } main:7::cputsxy:57::cputs:171 [ main::i#2 conio_cursor_x conio_cursor_y conio_line_text cputs::s#2 cputs::c#1 ] { { cputsxy::x#0 = main::i#2 cputsxy::y#0 } } ) always clobbers reg byte a reg byte y +Statement [184] *((byte*) uctoa::buffer#11) ← *((const byte*) DIGITS + (byte) uctoa::value#2) [ uctoa::buffer#11 ] ( uctoa:54 [ main::i#2 uctoa::buffer#11 ] { } main:7::uctoa:54 [ main::i#2 uctoa::buffer#11 ] { } ) always clobbers reg byte a reg byte y +Statement [185] (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#11 [ uctoa::buffer#3 ] ( uctoa:54 [ main::i#2 uctoa::buffer#3 ] { } main:7::uctoa:54 [ main::i#2 uctoa::buffer#3 ] { } ) always clobbers reg byte a +Statement [186] *((byte*) uctoa::buffer#3) ← (byte) 0 [ ] ( uctoa:54 [ main::i#2 ] { } main:7::uctoa:54 [ main::i#2 ] { } ) always clobbers reg byte a reg byte y +Statement [193] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#11 [ uctoa::digit#2 uctoa::value#2 uctoa::buffer#11 uctoa::digit_value#0 uctoa_append::buffer#0 ] ( uctoa:54 [ main::i#2 uctoa::digit#2 uctoa::value#2 uctoa::buffer#11 uctoa::digit_value#0 uctoa_append::buffer#0 ] { { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } main:7::uctoa:54 [ main::i#2 uctoa::digit#2 uctoa::value#2 uctoa::buffer#11 uctoa::digit_value#0 uctoa_append::buffer#0 ] { { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } ) always clobbers reg byte a +Statement [203] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2) [ uctoa_append::value#2 ] ( uctoa:54::uctoa_append:196 [ main::i#2 uctoa::digit#2 uctoa::buffer#11 uctoa_append::value#2 ] { { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } main:7::uctoa:54::uctoa_append:196 [ main::i#2 uctoa::digit#2 uctoa::buffer#11 uctoa_append::value#2 ] { { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } ) always clobbers reg byte a reg byte y +Statement [206] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0 [ uctoa_append::buffer#0 uctoa_append::sub#0 uctoa_append::value#1 uctoa_append::digit#1 ] ( uctoa:54::uctoa_append:196 [ main::i#2 uctoa::digit#2 uctoa::buffer#11 uctoa_append::buffer#0 uctoa_append::sub#0 uctoa_append::value#1 uctoa_append::digit#1 ] { { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } main:7::uctoa:54::uctoa_append:196 [ main::i#2 uctoa::digit#2 uctoa::buffer#11 uctoa_append::buffer#0 uctoa_append::sub#0 uctoa_append::value#1 uctoa_append::digit#1 ] { { uctoa_append::buffer#0 = uctoa::buffer#11 } { uctoa_append::value#0 = uctoa::value#2 } { uctoa_append::sub#0 = uctoa::digit_value#0 } { uctoa_append::return#0 = uctoa_append::value#2 } } ) always clobbers reg byte a +Statement [209] (byte) conio_cursor_x ← (byte) 0 [ ] ( clrscr:41 [ ] { } main:7::clrscr:41 [ ] { } ) always clobbers reg byte a +Statement [210] (byte) conio_cursor_y ← (byte) 0 [ ] ( clrscr:41 [ ] { } main:7::clrscr:41 [ ] { } ) always clobbers reg byte a +Statement [211] (byte*) conio_line_text ← (const nomodify byte*) PPU_NAME_TABLE_0 [ ] ( clrscr:41 [ ] { } main:7::clrscr:41 [ ] { } ) always clobbers reg byte a +Statement [217] (byte~) vblank::$1 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_DOWN [ x_scroll y_scroll vblank::joy#0 vblank::$1 ] ( [ x_scroll y_scroll vblank::joy#0 vblank::$1 ] { } ) always clobbers reg byte a +Statement [220] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a +Statement [221] (volatile byte) y_scroll ← (byte) 0 [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a +Statement [222] (byte~) vblank::$3 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_UP [ x_scroll y_scroll vblank::joy#0 vblank::$3 ] ( [ x_scroll y_scroll vblank::joy#0 vblank::$3 ] { } ) always clobbers reg byte a +Statement [225] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a +Statement [226] (volatile byte) y_scroll ← (byte) $ef [ x_scroll y_scroll vblank::joy#0 ] ( [ x_scroll y_scroll vblank::joy#0 ] { } ) always clobbers reg byte a +Statement [227] (byte~) vblank::$5 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_LEFT [ x_scroll y_scroll vblank::joy#0 vblank::$5 ] ( [ x_scroll y_scroll vblank::joy#0 vblank::$5 ] { } ) always clobbers reg byte a +Statement [230] (byte~) vblank::$7 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_RIGHT [ x_scroll y_scroll vblank::$7 ] ( [ x_scroll y_scroll vblank::$7 ] { } ) always clobbers reg byte a +Statement [233] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) x_scroll [ y_scroll ] ( [ y_scroll ] { } ) always clobbers reg byte a +Statement [234] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) y_scroll [ ] ( [ ] { } ) always clobbers reg byte a +Statement [235] return [ ] ( [ ] { } ) always clobbers reg byte a reg byte x reg byte y +Statement [236] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 1 [ ] ( readJoy1:214 [ x_scroll y_scroll ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a +Statement [237] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 0 [ ] ( readJoy1:214 [ x_scroll y_scroll ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a +Statement [241] (byte~) readJoy1::$1 ← (byte) readJoy1::joy#2 << (byte) 1 [ readJoy1::i#2 readJoy1::$1 ] ( readJoy1:214 [ x_scroll y_scroll readJoy1::i#2 readJoy1::$1 ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a +Statement [242] (byte~) readJoy1::$2 ← *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) & (byte) 1 [ readJoy1::i#2 readJoy1::$1 readJoy1::$2 ] ( readJoy1:214 [ x_scroll y_scroll readJoy1::i#2 readJoy1::$1 readJoy1::$2 ] { { readJoy1::return#2 = readJoy1::joy#2 } } ) always clobbers reg byte a Potential registers zp[1]:2 [ main::initNES1_i#2 main::initNES1_i#1 ] : zp[1]:2 , reg byte x , reg byte y , -Potential registers zp[2]:3 [ cputs::s#2 cputs::s#0 ] : zp[2]:3 , -Potential registers zp[1]:5 [ cscroll::y#2 cscroll::y#1 ] : zp[1]:5 , reg byte x , reg byte y , -Potential registers zp[2]:6 [ cscroll::line2#6 cscroll::line2#2 cscroll::line2#1 ] : zp[2]:6 , -Potential registers zp[2]:8 [ cscroll::line1#6 cscroll::line1#2 cscroll::line1#1 ] : zp[2]:8 , -Potential registers zp[1]:10 [ cscroll::x#2 cscroll::x#1 ] : zp[1]:10 , reg byte x , reg byte y , -Potential registers zp[2]:11 [ ppuDataSet::ppuDataPrepare1_ppuData#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ppuDataSet::ppuData#1 ] : zp[2]:11 , -Potential registers zp[1]:13 [ ppuDataSet::val#2 ppuDataSet::val#0 ppuDataSet::val#1 ] : zp[1]:13 , reg byte x , reg byte y , -Potential registers zp[2]:14 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] : zp[2]:14 , -Potential registers zp[2]:16 [ ppuDataFill::size#5 ] : zp[2]:16 , -Potential registers zp[1]:18 [ ppuDataFill::val#10 ] : zp[1]:18 , reg byte x , reg byte y , -Potential registers zp[2]:19 [ ppuDataFill::i#2 ppuDataFill::i#1 ] : zp[2]:19 , +Potential registers zp[1]:3 [ main::x#10 main::x#1 ] : zp[1]:3 , reg byte x , +Potential registers zp[1]:4 [ main::y#10 main::y#1 ] : zp[1]:4 , reg byte x , +Potential registers zp[1]:5 [ main::i#2 main::i#1 ] : zp[1]:5 , reg byte x , +Potential registers zp[1]:6 [ cputcxy::x#4 cputcxy::x#0 cputcxy::x#1 ] : zp[1]:6 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:7 [ cputcxy::y#4 cputcxy::y#3 cputcxy::y#2 ] : zp[1]:7 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:8 [ cputcxy::c#4 ] : zp[1]:8 , reg byte x , reg byte y , +Potential registers zp[1]:9 [ cputc::c#2 cputc::c#1 cputc::c#0 ] : zp[1]:9 , reg byte x , reg byte y , +Potential registers zp[1]:10 [ cscroll::y#2 cscroll::y#1 ] : zp[1]:10 , reg byte x , +Potential registers zp[2]:11 [ cscroll::line2#2 cscroll::line2#1 ] : zp[2]:11 , +Potential registers zp[2]:13 [ cscroll::line1#2 cscroll::line1#1 ] : zp[2]:13 , +Potential registers zp[2]:15 [ ppuDataTransfer::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuData#0 ] : zp[2]:15 , +Potential registers zp[2]:17 [ ppuDataTransfer::cpuData#2 ] : zp[2]:17 , +Potential registers zp[2]:19 [ ppuDataTransfer::size#3 ] : zp[2]:19 , Potential registers zp[2]:21 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] : zp[2]:21 , -Potential registers zp[2]:23 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#1 ] : zp[2]:23 , -Potential registers zp[1]:25 [ readJoy1::i#2 readJoy1::i#1 ] : zp[1]:25 , reg byte x , reg byte y , -Potential registers zp[1]:26 [ readJoy1::joy#2 readJoy1::joy#1 ] : zp[1]:26 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:27 [ conio_cursor_x ] : zp[1]:27 , -Potential registers zp[1]:28 [ conio_cursor_y ] : zp[1]:28 , -Potential registers zp[2]:29 [ conio_line_text ] : zp[2]:29 , -Potential registers zp[1]:31 [ x_scroll ] : zp[1]:31 , -Potential registers zp[1]:32 [ y_scroll ] : zp[1]:32 , -Potential registers zp[1]:33 [ main::initNES1_waitForVBlank1_$0 ] : zp[1]:33 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:34 [ main::initNES1_waitForVBlank2_$0 ] : zp[1]:34 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:35 [ cputs::c#1 ] : zp[1]:35 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:36 [ cputc::c#0 ] : zp[1]:36 , reg byte x , reg byte y , -Potential registers zp[2]:37 [ ppuDataSet::ppuData#0 ] : zp[2]:37 , -Potential registers zp[2]:39 [ ppuDataGet::ppuData#0 ] : zp[2]:39 , -Potential registers zp[1]:41 [ ppuDataGet::return#2 ] : zp[1]:41 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:42 [ cscroll::ch#0 ] : zp[1]:42 , reg byte x , reg byte y , -Potential registers zp[1]:43 [ ppuDataSet::ppuDataPrepare1_$0 ] : zp[1]:43 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:44 [ ppuDataSet::ppuDataPrepare1_$1 ] : zp[1]:44 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:45 [ ppuDataGet::ppuDataPrepare1_$0 ] : zp[1]:45 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:46 [ ppuDataGet::ppuDataPrepare1_$1 ] : zp[1]:46 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:47 [ ppuDataGet::ppuDataRead1_return#0 ] : zp[1]:47 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:48 [ ppuDataFill::ppuDataPrepare1_$0 ] : zp[1]:48 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:49 [ ppuDataFill::ppuDataPrepare1_$1 ] : zp[1]:49 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:50 [ ppuDataTransfer::ppuDataPut1_val#0 ] : zp[1]:50 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:51 [ readJoy1::return#2 ] : zp[1]:51 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:52 [ vblank::joy#0 ] : zp[1]:52 , reg byte x , reg byte y , -Potential registers zp[1]:53 [ vblank::$1 ] : zp[1]:53 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:54 [ vblank::$3 ] : zp[1]:54 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:55 [ vblank::$5 ] : zp[1]:55 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:56 [ vblank::$7 ] : zp[1]:56 , reg byte a , reg byte x , reg byte y , -Potential registers zp[1]:57 [ readJoy1::$1 ] : zp[1]:57 , reg byte x , reg byte y , -Potential registers zp[1]:58 [ readJoy1::$2 ] : zp[1]:58 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:23 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] : zp[2]:23 , +Potential registers zp[2]:25 [ ppuDataFetch::i#2 ppuDataFetch::i#1 ] : zp[2]:25 , +Potential registers zp[2]:27 [ ppuDataFetch::cpuDst#2 ppuDataFetch::cpuDst#1 ] : zp[2]:27 , +Potential registers zp[2]:29 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] : zp[2]:29 , +Potential registers zp[2]:31 [ ppuDataFill::size#5 ] : zp[2]:31 , +Potential registers zp[1]:33 [ ppuDataFill::val#10 ] : zp[1]:33 , reg byte x , reg byte y , +Potential registers zp[2]:34 [ ppuDataFill::i#2 ppuDataFill::i#1 ] : zp[2]:34 , +Potential registers zp[1]:36 [ gotoxy::y#5 gotoxy::y#4 gotoxy::y#2 gotoxy::y#3 ] : zp[1]:36 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:37 [ gotoxy::x#5 gotoxy::x#4 gotoxy::x#2 gotoxy::x#3 ] : zp[1]:37 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:38 [ cputs::s#2 cputs::s#0 ] : zp[2]:38 , +Potential registers zp[1]:40 [ uctoa::digit#2 uctoa::digit#1 ] : zp[1]:40 , reg byte x , +Potential registers zp[1]:41 [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ] : zp[1]:41 , reg byte x , reg byte y , +Potential registers zp[1]:42 [ uctoa::started#2 uctoa::started#4 ] : zp[1]:42 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:43 [ uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 ] : zp[2]:43 , +Potential registers zp[1]:45 [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ] : zp[1]:45 , reg byte x , +Potential registers zp[1]:46 [ uctoa_append::digit#2 uctoa_append::digit#1 ] : zp[1]:46 , reg byte x , reg byte y , +Potential registers zp[1]:47 [ readJoy1::i#2 readJoy1::i#1 ] : zp[1]:47 , reg byte x , reg byte y , +Potential registers zp[1]:48 [ readJoy1::joy#2 readJoy1::joy#1 ] : zp[1]:48 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:49 [ conio_cursor_x ] : zp[1]:49 , +Potential registers zp[1]:50 [ conio_cursor_y ] : zp[1]:50 , +Potential registers zp[2]:51 [ conio_line_text ] : zp[2]:51 , +Potential registers zp[1]:53 [ x_scroll ] : zp[1]:53 , +Potential registers zp[1]:54 [ y_scroll ] : zp[1]:54 , +Potential registers zp[1]:55 [ main::initNES1_waitForVBlank1_$0 ] : zp[1]:55 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:56 [ main::initNES1_waitForVBlank2_$0 ] : zp[1]:56 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:57 [ cputsxy::x#0 ] : zp[1]:57 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:58 [ cputsxy::y#0 ] : zp[1]:58 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:59 [ ppuDataSet::ppuData#0 ] : zp[2]:59 , +Potential registers zp[1]:61 [ ppuDataSet::val#0 ] : zp[1]:61 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:62 [ ppuDataFetch::ppuData#0 ] : zp[2]:62 , +Potential registers zp[1]:64 [ ppuDataTransfer::ppuDataPrepare1_$0 ] : zp[1]:64 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:65 [ ppuDataTransfer::ppuDataPrepare1_$1 ] : zp[1]:65 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:66 [ ppuDataTransfer::ppuDataPut1_val#0 ] : zp[1]:66 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:67 [ ppuDataFetch::ppuDataPrepare1_$0 ] : zp[1]:67 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:68 [ ppuDataFetch::ppuDataPrepare1_$1 ] : zp[1]:68 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:69 [ ppuDataFetch::ppuDataRead1_return#0 ] : zp[1]:69 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:70 [ ppuDataFill::ppuDataPrepare1_$0 ] : zp[1]:70 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:71 [ ppuDataFill::ppuDataPrepare1_$1 ] : zp[1]:71 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:72 [ ppuDataSet::ppuDataPrepare1_$0 ] : zp[1]:72 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:73 [ ppuDataSet::ppuDataPrepare1_$1 ] : zp[1]:73 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:74 [ gotoxy::$6 ] : zp[2]:74 , +Potential registers zp[2]:76 [ gotoxy::line_offset#0 ] : zp[2]:76 , +Potential registers zp[2]:78 [ gotoxy::$5 ] : zp[2]:78 , +Potential registers zp[1]:80 [ cputs::c#1 ] : zp[1]:80 , reg byte a , reg byte x , reg byte y , +Potential registers zp[2]:81 [ uctoa::buffer#3 ] : zp[2]:81 , +Potential registers zp[1]:83 [ uctoa::digit_value#0 ] : zp[1]:83 , reg byte x , reg byte y , +Potential registers zp[2]:84 [ uctoa_append::buffer#0 ] : zp[2]:84 , +Potential registers zp[1]:86 [ uctoa_append::sub#0 ] : zp[1]:86 , reg byte x , reg byte y , +Potential registers zp[1]:87 [ uctoa_append::return#0 ] : zp[1]:87 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:88 [ readJoy1::return#2 ] : zp[1]:88 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:89 [ vblank::joy#0 ] : zp[1]:89 , reg byte x , reg byte y , +Potential registers zp[1]:90 [ vblank::$1 ] : zp[1]:90 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:91 [ vblank::$3 ] : zp[1]:91 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:92 [ vblank::$5 ] : zp[1]:92 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:93 [ vblank::$7 ] : zp[1]:93 , reg byte a , reg byte x , reg byte y , +Potential registers zp[1]:94 [ readJoy1::$1 ] : zp[1]:94 , reg byte x , reg byte y , +Potential registers zp[1]:95 [ readJoy1::$2 ] : zp[1]:95 , reg byte a , reg byte x , reg byte y , REGISTER UPLIFT SCOPES -Uplift Scope [ppuDataSet] 20,000,000,002: zp[1]:43 [ ppuDataSet::ppuDataPrepare1_$0 ] 20,000,000,002: zp[1]:44 [ ppuDataSet::ppuDataPrepare1_$1 ] 8,000,023,337.67: zp[2]:11 [ ppuDataSet::ppuDataPrepare1_ppuData#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ppuDataSet::ppuData#1 ] 4,200,012,003.6: zp[1]:13 [ ppuDataSet::val#2 ppuDataSet::val#0 ppuDataSet::val#1 ] 5,000.5: zp[2]:37 [ ppuDataSet::ppuData#0 ] -Uplift Scope [ppuDataGet] 20,000,000,002: zp[1]:45 [ ppuDataGet::ppuDataPrepare1_$0 ] 20,000,000,002: zp[1]:46 [ ppuDataGet::ppuDataPrepare1_$1 ] 5,250,000,000.75: zp[2]:39 [ ppuDataGet::ppuData#0 ] 3,666,666,667.33: zp[1]:47 [ ppuDataGet::ppuDataRead1_return#0 ] 2,000,000,002: zp[1]:41 [ ppuDataGet::return#2 ] -Uplift Scope [cscroll] 2,272,727,275: zp[1]:10 [ cscroll::x#2 cscroll::x#1 ] 1,300,000,002.36: zp[2]:8 [ cscroll::line1#6 cscroll::line1#2 cscroll::line1#1 ] 747,619,049.52: zp[2]:6 [ cscroll::line2#6 cscroll::line2#2 cscroll::line2#1 ] 666,666,667.33: zp[1]:42 [ cscroll::ch#0 ] 221,428,573.64: zp[1]:5 [ cscroll::y#2 cscroll::y#1 ] -Uplift Scope [ppuDataFill] 300,000,003: zp[2]:19 [ ppuDataFill::i#2 ppuDataFill::i#1 ] 20,000,002: zp[1]:48 [ ppuDataFill::ppuDataPrepare1_$0 ] 20,000,002: zp[1]:49 [ ppuDataFill::ppuDataPrepare1_$1 ] 11,111,111.22: zp[2]:16 [ ppuDataFill::size#5 ] 11,111,111.22: zp[1]:18 [ ppuDataFill::val#10 ] 6,666,667.33: zp[2]:14 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] -Uplift Scope [] 64,002.16: zp[1]:28 [ conio_cursor_y ] 45,104.24: zp[2]:29 [ conio_line_text ] 5,189.19: zp[1]:27 [ conio_cursor_x ] 1.48: zp[1]:32 [ y_scroll ] 1.15: zp[1]:31 [ x_scroll ] -Uplift Scope [cputc] 7,001: zp[1]:36 [ cputc::c#0 ] -Uplift Scope [ppuDataTransfer] 2,602.6: zp[2]:21 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] 2,002: zp[1]:50 [ ppuDataTransfer::ppuDataPut1_val#0 ] 1,751.75: zp[2]:23 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#1 ] -Uplift Scope [cputs] 2,002: zp[2]:3 [ cputs::s#2 cputs::s#0 ] 1,001: zp[1]:35 [ cputs::c#1 ] -Uplift Scope [readJoy1] 262.6: zp[1]:25 [ readJoy1::i#2 readJoy1::i#1 ] 202: zp[1]:58 [ readJoy1::$2 ] 152: zp[1]:26 [ readJoy1::joy#2 readJoy1::joy#1 ] 101: zp[1]:57 [ readJoy1::$1 ] 4: zp[1]:51 [ readJoy1::return#2 ] -Uplift Scope [main] 263.72: zp[1]:2 [ main::initNES1_i#2 main::initNES1_i#1 ] 202: zp[1]:33 [ main::initNES1_waitForVBlank1_$0 ] 202: zp[1]:34 [ main::initNES1_waitForVBlank2_$0 ] -Uplift Scope [vblank] 4: zp[1]:53 [ vblank::$1 ] 4: zp[1]:54 [ vblank::$3 ] 4: zp[1]:55 [ vblank::$5 ] 4: zp[1]:56 [ vblank::$7 ] 0.71: zp[1]:52 [ vblank::joy#0 ] +Uplift Scope [ppuDataFetch] 260,000,000,000,000,000: zp[2]:25 [ ppuDataFetch::i#2 ppuDataFetch::i#1 ] 200,000,000,000,000,000: zp[1]:69 [ ppuDataFetch::ppuDataRead1_return#0 ] 175,000,000,000,000,000: zp[2]:27 [ ppuDataFetch::cpuDst#2 ppuDataFetch::cpuDst#1 ] 20,000,000,000,002: zp[1]:67 [ ppuDataFetch::ppuDataPrepare1_$0 ] 20,000,000,000,002: zp[1]:68 [ ppuDataFetch::ppuDataPrepare1_$1 ] 5,250,000,000,000.75: zp[2]:62 [ ppuDataFetch::ppuData#0 ] +Uplift Scope [ppuDataTransfer] 2,600,000,000,000,002.5: zp[2]:21 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] 2,000,000,000,000,002: zp[1]:66 [ ppuDataTransfer::ppuDataPut1_val#0 ] 1,772,500,000,000,004: zp[2]:23 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] 83,333,333,333,333.42: zp[2]:19 [ ppuDataTransfer::size#3 ] 20,000,000,000,002: zp[1]:64 [ ppuDataTransfer::ppuDataPrepare1_$0 ] 20,000,000,000,002: zp[1]:65 [ ppuDataTransfer::ppuDataPrepare1_$1 ] 9,000,000,000,003: zp[2]:15 [ ppuDataTransfer::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuData#0 ] 0: zp[2]:17 [ ppuDataTransfer::cpuData#2 ] +Uplift Scope [cscroll] 2,375,000,000,002.38: zp[1]:10 [ cscroll::y#2 cscroll::y#1 ] 1,285,714,285,715.57: zp[2]:11 [ cscroll::line2#2 cscroll::line2#1 ] 1,000,000,000,001: zp[2]:13 [ cscroll::line1#2 cscroll::line1#1 ] +Uplift Scope [ppuDataFill] 3,000,000,000,003: zp[2]:34 [ ppuDataFill::i#2 ppuDataFill::i#1 ] 111,111,111,111.22: zp[2]:31 [ ppuDataFill::size#5 ] 111,111,111,111.22: zp[1]:33 [ ppuDataFill::val#10 ] 20,000,000,002: zp[1]:70 [ ppuDataFill::ppuDataPrepare1_$0 ] 20,000,000,002: zp[1]:71 [ ppuDataFill::ppuDataPrepare1_$1 ] 6,666,666,667.33: zp[2]:29 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] +Uplift Scope [uctoa_append] 2,500,550,003.5: zp[1]:45 [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ] 2,000,500,002.5: zp[1]:46 [ uctoa_append::digit#2 uctoa_append::digit#1 ] 333,350,000.5: zp[1]:86 [ uctoa_append::sub#0 ] 200,002: zp[1]:87 [ uctoa_append::return#0 ] 137,500.25: zp[2]:84 [ uctoa_append::buffer#0 ] +Uplift Scope [ppuDataSet] 200,000,002: zp[1]:72 [ ppuDataSet::ppuDataPrepare1_$0 ] 200,000,002: zp[1]:73 [ ppuDataSet::ppuDataPrepare1_$1 ] 18,333,333.67: zp[1]:61 [ ppuDataSet::val#0 ] 2,000,000.2: zp[2]:59 [ ppuDataSet::ppuData#0 ] +Uplift Scope [] 65,306,328.76: zp[1]:50 [ conio_cursor_y ] 49,111,335.76: zp[2]:51 [ conio_line_text ] 4,375,315.91: zp[1]:49 [ conio_cursor_x ] 1.48: zp[1]:54 [ y_scroll ] 1.15: zp[1]:53 [ x_scroll ] +Uplift Scope [cputc] 9,002,338.67: zp[1]:9 [ cputc::c#2 cputc::c#1 cputc::c#0 ] +Uplift Scope [cputs] 2,000,002: zp[2]:38 [ cputs::s#2 cputs::s#0 ] 1,000,001: zp[1]:80 [ cputs::c#1 ] +Uplift Scope [uctoa] 383,504: zp[2]:43 [ uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 ] 317,554.5: zp[1]:41 [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ] 230,771.54: zp[1]:40 [ uctoa::digit#2 uctoa::digit#1 ] 160,001.6: zp[1]:42 [ uctoa::started#2 uctoa::started#4 ] 60,000.6: zp[1]:83 [ uctoa::digit_value#0 ] 2,002: zp[2]:81 [ uctoa::buffer#3 ] +Uplift Scope [gotoxy] 25,671.33: zp[1]:37 [ gotoxy::x#5 gotoxy::x#4 gotoxy::x#2 gotoxy::x#3 ] 20,002: zp[2]:74 [ gotoxy::$6 ] 20,002: zp[2]:76 [ gotoxy::line_offset#0 ] 20,002: zp[2]:78 [ gotoxy::$5 ] 14,672.33: zp[1]:36 [ gotoxy::y#5 gotoxy::y#4 gotoxy::y#2 gotoxy::y#3 ] +Uplift Scope [cputcxy] 1,607: zp[1]:6 [ cputcxy::x#4 cputcxy::x#0 cputcxy::x#1 ] 1,005.5: zp[1]:7 [ cputcxy::y#4 cputcxy::y#3 cputcxy::y#2 ] 250.25: zp[1]:8 [ cputcxy::c#4 ] +Uplift Scope [main] 288.57: zp[1]:5 [ main::i#2 main::i#1 ] 274.14: zp[1]:3 [ main::x#10 main::x#1 ] 274.14: zp[1]:4 [ main::y#10 main::y#1 ] 263.72: zp[1]:2 [ main::initNES1_i#2 main::initNES1_i#1 ] 202: zp[1]:55 [ main::initNES1_waitForVBlank1_$0 ] 202: zp[1]:56 [ main::initNES1_waitForVBlank2_$0 ] +Uplift Scope [cputsxy] 551: zp[1]:57 [ cputsxy::x#0 ] 551: zp[1]:58 [ cputsxy::y#0 ] +Uplift Scope [readJoy1] 262.6: zp[1]:47 [ readJoy1::i#2 readJoy1::i#1 ] 202: zp[1]:95 [ readJoy1::$2 ] 152: zp[1]:48 [ readJoy1::joy#2 readJoy1::joy#1 ] 101: zp[1]:94 [ readJoy1::$1 ] 4: zp[1]:88 [ readJoy1::return#2 ] +Uplift Scope [vblank] 4: zp[1]:90 [ vblank::$1 ] 4: zp[1]:91 [ vblank::$3 ] 4: zp[1]:92 [ vblank::$5 ] 4: zp[1]:93 [ vblank::$7 ] 0.71: zp[1]:89 [ vblank::joy#0 ] Uplift Scope [RICOH_2C02] Uplift Scope [RICOH_2A03] Uplift Scope [SpriteData] Uplift Scope [clrscr] Uplift Scope [cputln] +Uplift Scope [RADIX] +Uplift Scope [printf_format_number] +Uplift Scope [printf_buffer_number] +Uplift Scope [printf_format_string] -Uplifting [ppuDataSet] best 103280 combination reg byte a [ ppuDataSet::ppuDataPrepare1_$0 ] reg byte a [ ppuDataSet::ppuDataPrepare1_$1 ] zp[2]:11 [ ppuDataSet::ppuDataPrepare1_ppuData#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ppuDataSet::ppuData#1 ] reg byte x [ ppuDataSet::val#2 ppuDataSet::val#0 ppuDataSet::val#1 ] zp[2]:37 [ ppuDataSet::ppuData#0 ] -Uplifting [ppuDataGet] best 94265 combination reg byte a [ ppuDataGet::ppuDataPrepare1_$0 ] reg byte a [ ppuDataGet::ppuDataPrepare1_$1 ] zp[2]:39 [ ppuDataGet::ppuData#0 ] reg byte a [ ppuDataGet::ppuDataRead1_return#0 ] reg byte a [ ppuDataGet::return#2 ] -Limited combination testing to 100 combinations of 256 possible. -Uplifting [cscroll] best 81265 combination reg byte y [ cscroll::x#2 cscroll::x#1 ] zp[2]:8 [ cscroll::line1#6 cscroll::line1#2 cscroll::line1#1 ] zp[2]:6 [ cscroll::line2#6 cscroll::line2#2 cscroll::line2#1 ] reg byte x [ cscroll::ch#0 ] zp[1]:5 [ cscroll::y#2 cscroll::y#1 ] -Uplifting [ppuDataFill] best 81211 combination zp[2]:19 [ ppuDataFill::i#2 ppuDataFill::i#1 ] reg byte a [ ppuDataFill::ppuDataPrepare1_$0 ] reg byte a [ ppuDataFill::ppuDataPrepare1_$1 ] zp[2]:16 [ ppuDataFill::size#5 ] reg byte x [ ppuDataFill::val#10 ] zp[2]:14 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] -Uplifting [] best 81211 combination zp[1]:28 [ conio_cursor_y ] zp[2]:29 [ conio_line_text ] zp[1]:27 [ conio_cursor_x ] zp[1]:32 [ y_scroll ] zp[1]:31 [ x_scroll ] -Uplifting [cputc] best 81175 combination reg byte x [ cputc::c#0 ] -Uplifting [ppuDataTransfer] best 81115 combination zp[2]:21 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] reg byte a [ ppuDataTransfer::ppuDataPut1_val#0 ] zp[2]:23 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#1 ] -Uplifting [cputs] best 81045 combination zp[2]:3 [ cputs::s#2 cputs::s#0 ] reg byte a [ cputs::c#1 ] -Uplifting [readJoy1] best 80802 combination reg byte x [ readJoy1::i#2 readJoy1::i#1 ] reg byte a [ readJoy1::$2 ] reg byte a [ readJoy1::joy#2 readJoy1::joy#1 ] zp[1]:57 [ readJoy1::$1 ] zp[1]:51 [ readJoy1::return#2 ] +Uplifting [ppuDataFetch] best 1044893 combination zp[2]:25 [ ppuDataFetch::i#2 ppuDataFetch::i#1 ] reg byte a [ ppuDataFetch::ppuDataRead1_return#0 ] zp[2]:27 [ ppuDataFetch::cpuDst#2 ppuDataFetch::cpuDst#1 ] reg byte a [ ppuDataFetch::ppuDataPrepare1_$0 ] reg byte a [ ppuDataFetch::ppuDataPrepare1_$1 ] zp[2]:62 [ ppuDataFetch::ppuData#0 ] +Uplifting [ppuDataTransfer] best 1044281 combination zp[2]:21 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] reg byte a [ ppuDataTransfer::ppuDataPut1_val#0 ] zp[2]:23 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] zp[2]:19 [ ppuDataTransfer::size#3 ] reg byte a [ ppuDataTransfer::ppuDataPrepare1_$0 ] reg byte a [ ppuDataTransfer::ppuDataPrepare1_$1 ] zp[2]:15 [ ppuDataTransfer::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuData#0 ] zp[2]:17 [ ppuDataTransfer::cpuData#2 ] +Uplifting [cscroll] best 1035281 combination reg byte x [ cscroll::y#2 cscroll::y#1 ] zp[2]:11 [ cscroll::line2#2 cscroll::line2#1 ] zp[2]:13 [ cscroll::line1#2 cscroll::line1#1 ] +Uplifting [ppuDataFill] best 1034957 combination zp[2]:34 [ ppuDataFill::i#2 ppuDataFill::i#1 ] zp[2]:31 [ ppuDataFill::size#5 ] reg byte x [ ppuDataFill::val#10 ] reg byte a [ ppuDataFill::ppuDataPrepare1_$0 ] reg byte a [ ppuDataFill::ppuDataPrepare1_$1 ] zp[2]:29 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] +Uplifting [uctoa_append] best 1022754 combination reg byte x [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ] reg byte y [ uctoa_append::digit#2 uctoa_append::digit#1 ] zp[1]:86 [ uctoa_append::sub#0 ] reg byte x [ uctoa_append::return#0 ] zp[2]:84 [ uctoa_append::buffer#0 ] +Uplifting [ppuDataSet] best 1022736 combination reg byte x [ ppuDataSet::ppuDataPrepare1_$0 ] reg byte x [ ppuDataSet::ppuDataPrepare1_$1 ] reg byte a [ ppuDataSet::val#0 ] zp[2]:59 [ ppuDataSet::ppuData#0 ] +Uplifting [] best 1022736 combination zp[1]:50 [ conio_cursor_y ] zp[2]:51 [ conio_line_text ] zp[1]:49 [ conio_cursor_x ] zp[1]:54 [ y_scroll ] zp[1]:53 [ x_scroll ] +Uplifting [cputc] best 1022429 combination reg byte x [ cputc::c#2 cputc::c#1 cputc::c#0 ] +Uplifting [cputs] best 1021729 combination zp[2]:38 [ cputs::s#2 cputs::s#0 ] reg byte a [ cputs::c#1 ] +Uplifting [uctoa] best 1020816 combination zp[2]:43 [ uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 ] reg byte x [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ] zp[1]:40 [ uctoa::digit#2 uctoa::digit#1 ] zp[1]:42 [ uctoa::started#2 uctoa::started#4 ] zp[1]:83 [ uctoa::digit_value#0 ] zp[2]:81 [ uctoa::buffer#3 ] +Uplifting [gotoxy] best 1020783 combination reg byte x [ gotoxy::x#5 gotoxy::x#4 gotoxy::x#2 gotoxy::x#3 ] zp[2]:74 [ gotoxy::$6 ] zp[2]:76 [ gotoxy::line_offset#0 ] zp[2]:78 [ gotoxy::$5 ] reg byte a [ gotoxy::y#5 gotoxy::y#4 gotoxy::y#2 gotoxy::y#3 ] +Uplifting [cputcxy] best 1020634 combination reg byte x [ cputcxy::x#4 cputcxy::x#0 cputcxy::x#1 ] reg byte a [ cputcxy::y#4 cputcxy::y#3 cputcxy::y#2 ] reg byte y [ cputcxy::c#4 ] +Uplifting [main] best 1020244 combination zp[1]:5 [ main::i#2 main::i#1 ] zp[1]:3 [ main::x#10 main::x#1 ] zp[1]:4 [ main::y#10 main::y#1 ] reg byte x [ main::initNES1_i#2 main::initNES1_i#1 ] reg byte a [ main::initNES1_waitForVBlank1_$0 ] zp[1]:56 [ main::initNES1_waitForVBlank2_$0 ] +Limited combination testing to 100 combinations of 384 possible. +Uplifting [cputsxy] best 1020178 combination reg byte x [ cputsxy::x#0 ] reg byte a [ cputsxy::y#0 ] +Uplifting [readJoy1] best 1019935 combination reg byte x [ readJoy1::i#2 readJoy1::i#1 ] reg byte a [ readJoy1::$2 ] reg byte a [ readJoy1::joy#2 readJoy1::joy#1 ] zp[1]:94 [ readJoy1::$1 ] zp[1]:88 [ readJoy1::return#2 ] Limited combination testing to 100 combinations of 576 possible. -Uplifting [main] best 80352 combination reg byte x [ main::initNES1_i#2 main::initNES1_i#1 ] reg byte a [ main::initNES1_waitForVBlank1_$0 ] reg byte a [ main::initNES1_waitForVBlank2_$0 ] -Uplifting [vblank] best 80328 combination reg byte a [ vblank::$1 ] reg byte a [ vblank::$3 ] reg byte a [ vblank::$5 ] reg byte a [ vblank::$7 ] zp[1]:52 [ vblank::joy#0 ] +Uplifting [vblank] best 1019911 combination reg byte a [ vblank::$1 ] reg byte a [ vblank::$3 ] reg byte a [ vblank::$5 ] reg byte a [ vblank::$7 ] zp[1]:89 [ vblank::joy#0 ] Limited combination testing to 100 combinations of 768 possible. -Uplifting [RICOH_2C02] best 80328 combination -Uplifting [RICOH_2A03] best 80328 combination -Uplifting [SpriteData] best 80328 combination -Uplifting [clrscr] best 80328 combination -Uplifting [cputln] best 80328 combination -Attempting to uplift remaining variables inzp[1]:5 [ cscroll::y#2 cscroll::y#1 ] -Uplifting [cscroll] best 80328 combination zp[1]:5 [ cscroll::y#2 cscroll::y#1 ] -Attempting to uplift remaining variables inzp[1]:28 [ conio_cursor_y ] -Uplifting [] best 80328 combination zp[1]:28 [ conio_cursor_y ] -Attempting to uplift remaining variables inzp[1]:27 [ conio_cursor_x ] -Uplifting [] best 80328 combination zp[1]:27 [ conio_cursor_x ] -Attempting to uplift remaining variables inzp[1]:57 [ readJoy1::$1 ] -Uplifting [readJoy1] best 80328 combination zp[1]:57 [ readJoy1::$1 ] -Attempting to uplift remaining variables inzp[1]:51 [ readJoy1::return#2 ] -Uplifting [readJoy1] best 80322 combination reg byte a [ readJoy1::return#2 ] -Attempting to uplift remaining variables inzp[1]:32 [ y_scroll ] -Uplifting [] best 80322 combination zp[1]:32 [ y_scroll ] -Attempting to uplift remaining variables inzp[1]:31 [ x_scroll ] -Uplifting [] best 80322 combination zp[1]:31 [ x_scroll ] -Attempting to uplift remaining variables inzp[1]:52 [ vblank::joy#0 ] -Uplifting [vblank] best 80317 combination reg byte x [ vblank::joy#0 ] -Coalescing zero page register [ zp[2]:11 [ ppuDataSet::ppuDataPrepare1_ppuData#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ppuDataSet::ppuData#1 ] ] with [ zp[2]:37 [ ppuDataSet::ppuData#0 ] ] - score: 1 -Coalescing zero page register [ zp[2]:14 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] ] with [ zp[2]:11 [ ppuDataSet::ppuDataPrepare1_ppuData#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ppuDataSet::ppuData#1 ppuDataSet::ppuData#0 ] ] -Coalescing zero page register [ zp[2]:21 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] ] with [ zp[2]:3 [ cputs::s#2 cputs::s#0 ] ] -Coalescing zero page register [ zp[2]:23 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#1 ] ] with [ zp[2]:6 [ cscroll::line2#6 cscroll::line2#2 cscroll::line2#1 ] ] -Coalescing zero page register [ zp[2]:39 [ ppuDataGet::ppuData#0 ] ] with [ zp[2]:16 [ ppuDataFill::size#5 ] ] -Coalescing zero page register [ zp[2]:23 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#1 cscroll::line2#6 cscroll::line2#2 cscroll::line2#1 ] ] with [ zp[2]:19 [ ppuDataFill::i#2 ppuDataFill::i#1 ] ] -Allocated (was zp[1]:5) zp[1]:2 [ cscroll::y#2 cscroll::y#1 ] -Allocated (was zp[2]:8) zp[2]:3 [ cscroll::line1#6 cscroll::line1#2 cscroll::line1#1 ] -Allocated (was zp[2]:14) zp[2]:5 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataSet::ppuDataPrepare1_ppuData#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ppuDataSet::ppuData#1 ppuDataSet::ppuData#0 ] -Allocated (was zp[2]:21) zp[2]:7 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 cputs::s#2 cputs::s#0 ] -Allocated (was zp[2]:23) zp[2]:9 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#1 cscroll::line2#6 cscroll::line2#2 cscroll::line2#1 ppuDataFill::i#2 ppuDataFill::i#1 ] -Allocated (was zp[1]:27) zp[1]:11 [ conio_cursor_x ] -Allocated (was zp[1]:28) zp[1]:12 [ conio_cursor_y ] -Allocated (was zp[2]:29) zp[2]:13 [ conio_line_text ] -Allocated (was zp[1]:31) zp[1]:15 [ x_scroll ] -Allocated (was zp[1]:32) zp[1]:16 [ y_scroll ] -Allocated (was zp[2]:39) zp[2]:17 [ ppuDataGet::ppuData#0 ppuDataFill::size#5 ] -Allocated (was zp[1]:57) zp[1]:19 [ readJoy1::$1 ] +Uplifting [RICOH_2C02] best 1019911 combination +Uplifting [RICOH_2A03] best 1019911 combination +Uplifting [SpriteData] best 1019911 combination +Uplifting [clrscr] best 1019911 combination +Uplifting [cputln] best 1019911 combination +Uplifting [RADIX] best 1019911 combination +Uplifting [printf_format_number] best 1019911 combination +Uplifting [printf_buffer_number] best 1019911 combination +Uplifting [printf_format_string] best 1019911 combination +Attempting to uplift remaining variables inzp[1]:86 [ uctoa_append::sub#0 ] +Uplifting [uctoa_append] best 1019911 combination zp[1]:86 [ uctoa_append::sub#0 ] +Attempting to uplift remaining variables inzp[1]:50 [ conio_cursor_y ] +Uplifting [] best 1019911 combination zp[1]:50 [ conio_cursor_y ] +Attempting to uplift remaining variables inzp[1]:49 [ conio_cursor_x ] +Uplifting [] best 1019911 combination zp[1]:49 [ conio_cursor_x ] +Attempting to uplift remaining variables inzp[1]:40 [ uctoa::digit#2 uctoa::digit#1 ] +Uplifting [uctoa] best 1019911 combination zp[1]:40 [ uctoa::digit#2 uctoa::digit#1 ] +Attempting to uplift remaining variables inzp[1]:42 [ uctoa::started#2 uctoa::started#4 ] +Uplifting [uctoa] best 1019911 combination zp[1]:42 [ uctoa::started#2 uctoa::started#4 ] +Attempting to uplift remaining variables inzp[1]:83 [ uctoa::digit_value#0 ] +Uplifting [uctoa] best 1019911 combination zp[1]:83 [ uctoa::digit_value#0 ] +Attempting to uplift remaining variables inzp[1]:5 [ main::i#2 main::i#1 ] +Uplifting [main] best 1019911 combination zp[1]:5 [ main::i#2 main::i#1 ] +Attempting to uplift remaining variables inzp[1]:3 [ main::x#10 main::x#1 ] +Uplifting [main] best 1019911 combination zp[1]:3 [ main::x#10 main::x#1 ] +Attempting to uplift remaining variables inzp[1]:4 [ main::y#10 main::y#1 ] +Uplifting [main] best 1019911 combination zp[1]:4 [ main::y#10 main::y#1 ] +Attempting to uplift remaining variables inzp[1]:56 [ main::initNES1_waitForVBlank2_$0 ] +Uplifting [main] best 1019851 combination reg byte a [ main::initNES1_waitForVBlank2_$0 ] +Attempting to uplift remaining variables inzp[1]:94 [ readJoy1::$1 ] +Uplifting [readJoy1] best 1019851 combination zp[1]:94 [ readJoy1::$1 ] +Attempting to uplift remaining variables inzp[1]:88 [ readJoy1::return#2 ] +Uplifting [readJoy1] best 1019845 combination reg byte a [ readJoy1::return#2 ] +Attempting to uplift remaining variables inzp[1]:54 [ y_scroll ] +Uplifting [] best 1019845 combination zp[1]:54 [ y_scroll ] +Attempting to uplift remaining variables inzp[1]:53 [ x_scroll ] +Uplifting [] best 1019845 combination zp[1]:53 [ x_scroll ] +Attempting to uplift remaining variables inzp[1]:89 [ vblank::joy#0 ] +Uplifting [vblank] best 1019840 combination reg byte x [ vblank::joy#0 ] +Coalescing zero page register [ zp[2]:17 [ ppuDataTransfer::cpuData#2 ] ] with [ zp[2]:23 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] ] - score: 1 +Coalescing zero page register [ zp[2]:43 [ uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 ] ] with [ zp[2]:81 [ uctoa::buffer#3 ] ] - score: 1 +Coalescing zero page register [ zp[2]:43 [ uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 ] ] with [ zp[2]:84 [ uctoa_append::buffer#0 ] ] - score: 1 +Coalescing zero page register [ zp[2]:51 [ conio_line_text ] ] with [ zp[2]:78 [ gotoxy::$5 ] ] - score: 1 +Coalescing zero page register [ zp[2]:74 [ gotoxy::$6 ] ] with [ zp[2]:76 [ gotoxy::line_offset#0 ] ] - score: 1 +Coalescing zero page register [ zp[1]:83 [ uctoa::digit_value#0 ] ] with [ zp[1]:86 [ uctoa_append::sub#0 ] ] - score: 1 +Coalescing zero page register [ zp[2]:51 [ conio_line_text gotoxy::$5 ] ] with [ zp[2]:74 [ gotoxy::$6 gotoxy::line_offset#0 ] ] - score: 1 +Coalescing zero page register [ zp[2]:25 [ ppuDataFetch::i#2 ppuDataFetch::i#1 ] ] with [ zp[2]:15 [ ppuDataTransfer::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuData#0 ] ] +Coalescing zero page register [ zp[2]:27 [ ppuDataFetch::cpuDst#2 ppuDataFetch::cpuDst#1 ] ] with [ zp[2]:17 [ ppuDataTransfer::cpuData#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] ] +Coalescing zero page register [ zp[2]:29 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ] ] with [ zp[2]:19 [ ppuDataTransfer::size#3 ] ] +Coalescing zero page register [ zp[2]:31 [ ppuDataFill::size#5 ] ] with [ zp[2]:21 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] ] +Coalescing zero page register [ zp[2]:43 [ uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 ] ] with [ zp[2]:11 [ cscroll::line2#2 cscroll::line2#1 ] ] +Coalescing zero page register [ zp[1]:49 [ conio_cursor_x ] ] with [ zp[1]:40 [ uctoa::digit#2 uctoa::digit#1 ] ] +Coalescing zero page register [ zp[1]:50 [ conio_cursor_y ] ] with [ zp[1]:42 [ uctoa::started#2 uctoa::started#4 ] ] +Coalescing zero page register [ zp[2]:59 [ ppuDataSet::ppuData#0 ] ] with [ zp[2]:13 [ cscroll::line1#2 cscroll::line1#1 ] ] +Coalescing zero page register [ zp[2]:62 [ ppuDataFetch::ppuData#0 ] ] with [ zp[2]:34 [ ppuDataFill::i#2 ppuDataFill::i#1 ] ] +Allocated (was zp[1]:3) zp[1]:2 [ main::x#10 main::x#1 ] +Allocated (was zp[1]:4) zp[1]:3 [ main::y#10 main::y#1 ] +Allocated (was zp[1]:5) zp[1]:4 [ main::i#2 main::i#1 ] +Allocated (was zp[2]:25) zp[2]:5 [ ppuDataFetch::i#2 ppuDataFetch::i#1 ppuDataTransfer::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuData#0 ] +Allocated (was zp[2]:27) zp[2]:7 [ ppuDataFetch::cpuDst#2 ppuDataFetch::cpuDst#1 ppuDataTransfer::cpuData#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] +Allocated (was zp[2]:29) zp[2]:9 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataTransfer::size#3 ] +Allocated (was zp[2]:31) zp[2]:11 [ ppuDataFill::size#5 ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] +Allocated (was zp[2]:38) zp[2]:13 [ cputs::s#2 cputs::s#0 ] +Allocated (was zp[2]:43) zp[2]:15 [ uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 cscroll::line2#2 cscroll::line2#1 ] +Allocated (was zp[1]:49) zp[1]:17 [ conio_cursor_x uctoa::digit#2 uctoa::digit#1 ] +Allocated (was zp[1]:50) zp[1]:18 [ conio_cursor_y uctoa::started#2 uctoa::started#4 ] +Allocated (was zp[2]:51) zp[2]:19 [ conio_line_text gotoxy::$5 gotoxy::$6 gotoxy::line_offset#0 ] +Allocated (was zp[1]:53) zp[1]:21 [ x_scroll ] +Allocated (was zp[1]:54) zp[1]:22 [ y_scroll ] +Allocated (was zp[2]:59) zp[2]:23 [ ppuDataSet::ppuData#0 cscroll::line1#2 cscroll::line1#1 ] +Allocated (was zp[2]:62) zp[2]:25 [ ppuDataFetch::ppuData#0 ppuDataFill::i#2 ppuDataFill::i#1 ] +Allocated (was zp[1]:83) zp[1]:27 [ uctoa::digit_value#0 uctoa_append::sub#0 ] +Allocated (was zp[1]:94) zp[1]:28 [ readJoy1::$1 ] ASSEMBLER BEFORE OPTIMIZATION // File Comments @@ -4052,6 +6195,10 @@ ASSEMBLER BEFORE OPTIMIZATION // $3000-$3eff $0f00 Mirrors of $2000-$2eff // $3f00-$3f1f $0020 Palette RAM indexes .label PPU_PALETTE = $3f00 + // PPU Status Register for reading in ASM + .label PPU_PPUSTATUS = $2002 + // PPU Data Register for reading in ASM + .label PPU_PPUDATA = $2007 // APU Frame Counter // generates low-frequency clocks for the channels and an optional 60 Hz interrupt. // https://wiki.nesdev.com/w/index.php/APU_Frame_Counter @@ -4066,17 +6213,15 @@ ASSEMBLER BEFORE OPTIMIZATION .label FR_COUNTER = $4017 // Pointer to the start of RAM memory .label MEMORY = 0 - // PPU Status Register for reading in ASM - .label PPU_PPUSTATUS = $2002 // NES Picture Processing Unit (PPU) .label PPU = $2000 // NES CPU and audion processing unit (APU) .label APU = $4000 - .label conio_cursor_x = $b - .label conio_cursor_y = $c - .label conio_line_text = $d - .label x_scroll = $f - .label y_scroll = $10 + .label conio_cursor_x = $11 + .label conio_cursor_y = $12 + .label conio_line_text = $13 + .label x_scroll = $15 + .label y_scroll = $16 // @begin __bbegin: jmp __b1 @@ -4123,6 +6268,14 @@ __bend: // main // RESET Called when the NES is reset, including when it is turned on. main: { + .const screensizex1_return = $20 + .const screensizey1_return = $1e + .const screensizey2_return = $1e + .const screensizex2_return = $20 + .const screensizey3_return = $1e + .label x = 2 + .label y = 3 + .label i = 4 jmp initNES1 // main::initNES1 initNES1: @@ -4226,163 +6379,308 @@ main: { initNES1___b7: // asm { ldaPPU_PPUSTATUS } lda PPU_PPUSTATUS - // [34] phi from main::initNES1_@7 to main::@2 [phi:main::initNES1_@7->main::@2] - __b2_from_initNES1___b7: - jmp __b2 - // main::@2 - __b2: + // [34] phi from main::initNES1_@7 to main::@6 [phi:main::initNES1_@7->main::@6] + __b6_from_initNES1___b7: + jmp __b6 + // main::@6 + __b6: // [35] call ppuDataTransfer // Transfer the palette - // [125] phi from main::@2 to ppuDataTransfer [phi:main::@2->ppuDataTransfer] - ppuDataTransfer_from___b2: + // [110] phi from main::@6 to ppuDataTransfer [phi:main::@6->ppuDataTransfer] + ppuDataTransfer_from___b6: + // [110] phi (word) ppuDataTransfer::size#3 = (byte) $20*(const byte) SIZEOF_BYTE [phi:main::@6->ppuDataTransfer#0] -- vwuz1=vbuc1 + lda #<$20*SIZEOF_BYTE + sta.z ppuDataTransfer.size + lda #>$20*SIZEOF_BYTE + sta.z ppuDataTransfer.size+1 + // [110] phi (nomodify void*) ppuDataTransfer::cpuData#2 = (void*)(const byte*) PALETTE [phi:main::@6->ppuDataTransfer#1] -- pvoz1=pvoc1 + lda #PALETTE + sta.z ppuDataTransfer.cpuData+1 + // [110] phi (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_PALETTE [phi:main::@6->ppuDataTransfer#2] -- pvoz1=pvoc1 + lda #PPU_PALETTE + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData+1 jsr ppuDataTransfer - // [36] phi from main::@2 to main::@3 [phi:main::@2->main::@3] - __b3_from___b2: - jmp __b3 - // main::@3 - __b3: + // [36] phi from main::@6 to main::@12 [phi:main::@6->main::@12] + __b12_from___b6: + jmp __b12 + // main::@12 + __b12: // [37] call ppuDataFill // Fill the PPU attribute table - // [109] phi from main::@3 to ppuDataFill [phi:main::@3->ppuDataFill] - ppuDataFill_from___b3: - // [109] phi (byte) ppuDataFill::val#10 = (byte) 0 [phi:main::@3->ppuDataFill#0] -- vbuxx=vbuc1 + // [136] phi from main::@12 to ppuDataFill [phi:main::@12->ppuDataFill] + ppuDataFill_from___b12: + // [136] phi (byte) ppuDataFill::val#10 = (byte) 0 [phi:main::@12->ppuDataFill#0] -- vbuxx=vbuc1 ldx #0 - // [109] phi (word) ppuDataFill::size#5 = (byte) $40 [phi:main::@3->ppuDataFill#1] -- vwuz1=vbuc1 + // [136] phi (word) ppuDataFill::size#5 = (byte) $40 [phi:main::@12->ppuDataFill#1] -- vwuz1=vbuc1 lda #<$40 sta.z ppuDataFill.size lda #>$40 sta.z ppuDataFill.size+1 - // [109] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 [phi:main::@3->ppuDataFill#2] -- pvoz1=pvoc1 + // [136] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 [phi:main::@12->ppuDataFill#2] -- pvoz1=pvoc1 lda #PPU_ATTRIBUTE_TABLE_0 sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 jsr ppuDataFill - // [38] phi from main::@3 to main::@4 [phi:main::@3->main::@4] - __b4_from___b3: - jmp __b4 - // main::@4 - __b4: + // [38] phi from main::@12 to main::@13 [phi:main::@12->main::@13] + __b13_from___b12: + jmp __b13 + // main::@13 + __b13: // [39] call ppuDataFill - // [109] phi from main::@4 to ppuDataFill [phi:main::@4->ppuDataFill] - ppuDataFill_from___b4: - // [109] phi (byte) ppuDataFill::val#10 = (byte) 0 [phi:main::@4->ppuDataFill#0] -- vbuxx=vbuc1 + // [136] phi from main::@13 to ppuDataFill [phi:main::@13->ppuDataFill] + ppuDataFill_from___b13: + // [136] phi (byte) ppuDataFill::val#10 = (byte) 0 [phi:main::@13->ppuDataFill#0] -- vbuxx=vbuc1 ldx #0 - // [109] phi (word) ppuDataFill::size#5 = (byte) $40 [phi:main::@4->ppuDataFill#1] -- vwuz1=vbuc1 + // [136] phi (word) ppuDataFill::size#5 = (byte) $40 [phi:main::@13->ppuDataFill#1] -- vwuz1=vbuc1 lda #<$40 sta.z ppuDataFill.size lda #>$40 sta.z ppuDataFill.size+1 - // [109] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_1 [phi:main::@4->ppuDataFill#2] -- pvoz1=pvoc1 + // [136] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_1 [phi:main::@13->ppuDataFill#2] -- pvoz1=pvoc1 lda #PPU_ATTRIBUTE_TABLE_1 sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 jsr ppuDataFill - // [40] phi from main::@4 to main::@5 [phi:main::@4->main::@5] - __b5_from___b4: - jmp __b5 - // main::@5 - __b5: + // [40] phi from main::@13 to main::@14 [phi:main::@13->main::@14] + __b14_from___b13: + jmp __b14 + // main::@14 + __b14: // [41] call clrscr // Print a string - // [119] phi from main::@5 to clrscr [phi:main::@5->clrscr] - clrscr_from___b5: + // [207] phi from main::@14 to clrscr [phi:main::@14->clrscr] + clrscr_from___b14: jsr clrscr - // [42] phi from main::@5 to main::@6 [phi:main::@5->main::@6] - __b6_from___b5: - jmp __b6 - // main::@6 - __b6: - // [43] call cputs - // [49] phi from main::@6 to cputs [phi:main::@6->cputs] - cputs_from___b6: - jsr cputs + // [42] phi from main::@14 to main::screensizex1 [phi:main::@14->main::screensizex1] + screensizex1_from___b14: + // [42] phi (byte) main::x#10 = (byte) 1 [phi:main::@14->main::screensizex1#0] -- vbuz1=vbuc1 + lda #1 + sta.z x + jmp screensizex1 + // main::screensizex1 + screensizex1: jmp __b7 // main::@7 __b7: - // [44] (volatile byte) x_scroll ← (byte) 0 -- vbuz1=vbuc1 + // [43] if((byte) main::x#10<(const byte) main::screensizex1_return#0-(byte) 1) goto main::@1 -- vbuz1_lt_vbuc1_then_la1 + lda.z x + cmp #screensizex1_return-1 + bcc __b1 + // [44] phi from main::@7 to main::screensizey2 [phi:main::@7->main::screensizey2] + screensizey2_from___b7: + // [44] phi (byte) main::y#10 = (byte) 1 [phi:main::@7->main::screensizey2#0] -- vbuz1=vbuc1 + lda #1 + sta.z y + jmp screensizey2 + // main::screensizey2 + screensizey2: + jmp __b9 + // main::@9 + __b9: + // [45] if((byte) main::y#10<(const byte) main::screensizey2_return#0-(byte) 3) goto main::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z y + cmp #screensizey2_return-3 + bcc __b2 + // [46] phi from main::@9 to main::screensizey3 [phi:main::@9->main::screensizey3] + screensizey3_from___b9: + // [46] phi (byte) main::i#2 = (byte) 0 [phi:main::@9->main::screensizey3#0] -- vbuz1=vbuc1 + lda #0 + sta.z i + jmp screensizey3 + // main::screensizey3 + screensizey3: + jmp __b11 + // main::@11 + __b11: + // [47] if((byte) main::i#2<(const byte) main::screensizey3_return#0) goto main::@3 -- vbuz1_lt_vbuc1_then_la1 + lda.z i + cmp #screensizey3_return + bcc __b3 + jmp __b4 + // main::@4 + __b4: + // [48] (volatile byte) x_scroll ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta.z x_scroll - // [45] (volatile byte) y_scroll ← (byte) -8 -- vbuz1=vbuc1 + // [49] (volatile byte) y_scroll ← (byte) -8 -- vbuz1=vbuc1 lda #-8 sta.z y_scroll jmp enableVideoOutput1 // main::enableVideoOutput1 enableVideoOutput1: - // [46] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 -- _deref_pbuc1=vbuc2 + // [50] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 -- _deref_pbuc1=vbuc2 lda #$80 sta PPU - // [47] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e -- _deref_pbuc1=vbuc2 + // [51] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e -- _deref_pbuc1=vbuc2 lda #$1e sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK - // [48] phi from main::@1 main::enableVideoOutput1 to main::@1 [phi:main::@1/main::enableVideoOutput1->main::@1] - __b1_from___b1: - __b1_from_enableVideoOutput1: - jmp __b1 + // [52] phi from main::@5 main::enableVideoOutput1 to main::@5 [phi:main::@5/main::enableVideoOutput1->main::@5] + __b5_from___b5: + __b5_from_enableVideoOutput1: + jmp __b5 // Infinite loop + // main::@5 + __b5: + jmp __b5_from___b5 + // main::@3 + __b3: + // [53] (byte) uctoa::value#1 ← (byte) main::i#2 & (byte) $f -- vbuxx=vbuz1_band_vbuc1 + lda #$f + and.z i + tax + // [54] call uctoa + // [181] phi from main::@3 to uctoa [phi:main::@3->uctoa] + uctoa_from___b3: + jsr uctoa + jmp __b17 + // main::@17 + __b17: + // [55] (byte) cputsxy::x#0 ← (byte) main::i#2 -- vbuxx=vbuz1 + ldx.z i + // [56] (byte) cputsxy::y#0 ← (byte) main::i#2 -- vbuaa=vbuz1 + lda.z i + // [57] call cputsxy + jsr cputsxy + jmp __b18 + // main::@18 + __b18: + // [58] (byte) main::i#1 ← ++ (byte) main::i#2 -- vbuz1=_inc_vbuz1 + inc.z i + // [46] phi from main::@18 to main::screensizey3 [phi:main::@18->main::screensizey3] + screensizey3_from___b18: + // [46] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@18->main::screensizey3#0] -- register_copy + jmp screensizey3 + // main::@2 + __b2: + // [59] (byte) cputcxy::y#2 ← (byte) main::y#10 -- vbuaa=vbuz1 + lda.z y + // [60] call cputcxy + // [71] phi from main::@2 to cputcxy [phi:main::@2->cputcxy] + cputcxy_from___b2: + // [71] phi (byte) cputcxy::c#4 = (byte) 'i' [phi:main::@2->cputcxy#0] -- vbuyy=vbuc1 + ldy #'i' + // [71] phi (byte) cputcxy::y#4 = (byte) cputcxy::y#2 [phi:main::@2->cputcxy#1] -- register_copy + // [71] phi (byte) cputcxy::x#4 = (byte) 1 [phi:main::@2->cputcxy#2] -- vbuxx=vbuc1 + ldx #1 + jsr cputcxy + // [61] phi from main::@2 to main::screensizex2 [phi:main::@2->main::screensizex2] + screensizex2_from___b2: + jmp screensizex2 + // main::screensizex2 + screensizex2: + jmp __b10 + // main::@10 + __b10: + // [62] (byte) cputcxy::y#3 ← (byte) main::y#10 -- vbuaa=vbuz1 + lda.z y + // [63] call cputcxy + // [71] phi from main::@10 to cputcxy [phi:main::@10->cputcxy] + cputcxy_from___b10: + // [71] phi (byte) cputcxy::c#4 = (byte) 'i' [phi:main::@10->cputcxy#0] -- vbuyy=vbuc1 + ldy #'i' + // [71] phi (byte) cputcxy::y#4 = (byte) cputcxy::y#3 [phi:main::@10->cputcxy#1] -- register_copy + // [71] phi (byte) cputcxy::x#4 = (const byte) main::screensizex2_return#0-(byte) 2 [phi:main::@10->cputcxy#2] -- vbuxx=vbuc1 + ldx #screensizex2_return-2 + jsr cputcxy + jmp __b16 + // main::@16 + __b16: + // [64] (byte) main::y#1 ← ++ (byte) main::y#10 -- vbuz1=_inc_vbuz1 + inc.z y + // [44] phi from main::@16 to main::screensizey2 [phi:main::@16->main::screensizey2] + screensizey2_from___b16: + // [44] phi (byte) main::y#10 = (byte) main::y#1 [phi:main::@16->main::screensizey2#0] -- register_copy + jmp screensizey2 // main::@1 __b1: - jmp __b1_from___b1 - .segment Data - s: .text @"hello world!\ni am nes\n look at me \n\n" - .byte 0 + // [65] (byte) cputcxy::x#0 ← (byte) main::x#10 -- vbuxx=vbuz1 + ldx.z x + // [66] call cputcxy + // [71] phi from main::@1 to cputcxy [phi:main::@1->cputcxy] + cputcxy_from___b1: + // [71] phi (byte) cputcxy::c#4 = (byte) '-' [phi:main::@1->cputcxy#0] -- vbuyy=vbuc1 + ldy #'-' + // [71] phi (byte) cputcxy::y#4 = (byte) 1 [phi:main::@1->cputcxy#1] -- vbuaa=vbuc1 + lda #1 + // [71] phi (byte) cputcxy::x#4 = (byte) cputcxy::x#0 [phi:main::@1->cputcxy#2] -- register_copy + jsr cputcxy + // [67] phi from main::@1 to main::screensizey1 [phi:main::@1->main::screensizey1] + screensizey1_from___b1: + jmp screensizey1 + // main::screensizey1 + screensizey1: + jmp __b8 + // main::@8 + __b8: + // [68] (byte) cputcxy::x#1 ← (byte) main::x#10 -- vbuxx=vbuz1 + ldx.z x + // [69] call cputcxy + // [71] phi from main::@8 to cputcxy [phi:main::@8->cputcxy] + cputcxy_from___b8: + // [71] phi (byte) cputcxy::c#4 = (byte) '-' [phi:main::@8->cputcxy#0] -- vbuyy=vbuc1 + ldy #'-' + // [71] phi (byte) cputcxy::y#4 = (const byte) main::screensizey1_return#0-(byte) 4 [phi:main::@8->cputcxy#1] -- vbuaa=vbuc1 + lda #screensizey1_return-4 + // [71] phi (byte) cputcxy::x#4 = (byte) cputcxy::x#1 [phi:main::@8->cputcxy#2] -- register_copy + jsr cputcxy + jmp __b15 + // main::@15 + __b15: + // [70] (byte) main::x#1 ← ++ (byte) main::x#10 -- vbuz1=_inc_vbuz1 + inc.z x + // [42] phi from main::@15 to main::screensizex1 [phi:main::@15->main::screensizex1] + screensizex1_from___b15: + // [42] phi (byte) main::x#10 = (byte) main::x#1 [phi:main::@15->main::screensizex1#0] -- register_copy + jmp screensizex1 } -.segment Code - // cputs -// Output a NUL-terminated string at the current cursor position -// cputs(byte* zp(7) s) -cputs: { - .label s = 7 - // [50] phi from cputs to cputs::@1 [phi:cputs->cputs::@1] - __b1_from_cputs: - // [50] phi (to_nomodify byte*) cputs::s#2 = (const byte*) main::s [phi:cputs->cputs::@1#0] -- pbuz1=pbuc1 - lda #main.s - sta.z s+1 + // cputcxy +// Move cursor and output one character +// Same as "gotoxy (x, y); cputc (c);" +// cputcxy(byte register(X) x, byte register(A) y, byte register(Y) c) +cputcxy: { + // [72] (byte) gotoxy::x#2 ← (byte) cputcxy::x#4 + // [73] (byte) gotoxy::y#2 ← (byte) cputcxy::y#4 + // [74] call gotoxy + // [153] phi from cputcxy to gotoxy [phi:cputcxy->gotoxy] + gotoxy_from_cputcxy: + // [153] phi (byte) gotoxy::x#4 = (byte) gotoxy::x#2 [phi:cputcxy->gotoxy#0] -- register_copy + // [153] phi (byte) gotoxy::y#4 = (byte) gotoxy::y#2 [phi:cputcxy->gotoxy#1] -- register_copy + jsr gotoxy jmp __b1 - // cputs::@1 + // cputcxy::@1 __b1: - // [51] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#2) -- vbuaa=_deref_pbuz1 - ldy #0 - lda (s),y - // [52] (to_nomodify byte*) cputs::s#0 ← ++ (to_nomodify byte*) cputs::s#2 -- pbuz1=_inc_pbuz1 - inc.z s - bne !+ - inc.z s+1 - !: - // [53] if((byte) 0!=(byte) cputs::c#1) goto cputs::@2 -- vbuc1_neq_vbuaa_then_la1 - cmp #0 - bne __b2 - jmp __breturn - // cputs::@return - __breturn: - // [54] return - rts - // cputs::@2 - __b2: - // [55] (byte) cputc::c#0 ← (byte) cputs::c#1 -- vbuxx=vbuaa + // [75] (byte) cputc::c#1 ← (byte) cputcxy::c#4 -- vbuxx=vbuyy + tya tax - // [56] call cputc + // [76] call cputc + // [78] phi from cputcxy::@1 to cputc [phi:cputcxy::@1->cputc] + cputc_from___b1: + // [78] phi (byte) cputc::c#2 = (byte) cputc::c#1 [phi:cputcxy::@1->cputc#0] -- register_copy jsr cputc - // [50] phi from cputs::@2 to cputs::@1 [phi:cputs::@2->cputs::@1] - __b1_from___b2: - // [50] phi (to_nomodify byte*) cputs::s#2 = (to_nomodify byte*) cputs::s#0 [phi:cputs::@2->cputs::@1#0] -- register_copy - jmp __b1 + jmp __breturn + // cputcxy::@return + __breturn: + // [77] return + rts } // cputc // Output one character at the current cursor position // Moves the cursor forward. Scrolls the entire screen if needed // cputc(byte register(X) c) cputc: { - // [57] if((byte) cputc::c#0==(byte) ' ') goto cputc::@1 -- vbuxx_eq_vbuc1_then_la1 + // [79] if((byte) cputc::c#2==(byte) ' ') goto cputc::@1 -- vbuxx_eq_vbuc1_then_la1 cpx #'\n' beq __b1_from_cputc jmp __b2 // cputc::@2 __b2: - // [58] (nomodify byte*) ppuDataSet::ppuData#0 ← (byte*) conio_line_text + (byte) conio_cursor_x -- pbuz1=pbuz2_plus_vbuz3 + // [80] (nomodify byte*) ppuDataSet::ppuData#0 ← (byte*) conio_line_text + (byte) conio_cursor_x -- pbuz1=pbuz2_plus_vbuz3 lda.z conio_cursor_x clc adc.z conio_line_text @@ -4390,48 +6688,46 @@ cputc: { lda #0 adc.z conio_line_text+1 sta.z ppuDataSet.ppuData+1 - // [59] (byte) ppuDataSet::val#0 ← (byte) cputc::c#0 - // [60] (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#2 ← (void*)(nomodify byte*) ppuDataSet::ppuData#0 - // [61] call ppuDataSet - // [95] phi from cputc::@2 to ppuDataSet [phi:cputc::@2->ppuDataSet] + // [81] (byte) ppuDataSet::val#0 ← (byte) cputc::c#2 -- vbuaa=vbuxx + txa + // [82] call ppuDataSet + // [146] phi from cputc::@2 to ppuDataSet [phi:cputc::@2->ppuDataSet] ppuDataSet_from___b2: - // [95] phi (byte) ppuDataSet::val#2 = (byte) ppuDataSet::val#0 [phi:cputc::@2->ppuDataSet#0] -- register_copy - // [95] phi (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 = (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#2 [phi:cputc::@2->ppuDataSet#1] -- register_copy jsr ppuDataSet jmp __b4 // cputc::@4 __b4: - // [62] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x -- vbuz1=_inc_vbuz1 + // [83] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x -- vbuz1=_inc_vbuz1 inc.z conio_cursor_x - // [63] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return -- vbuz1_neq_vbuc1_then_la1 + // [84] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return -- vbuz1_neq_vbuc1_then_la1 lda #$20 cmp.z conio_cursor_x bne __breturn - // [64] phi from cputc::@4 to cputc::@3 [phi:cputc::@4->cputc::@3] + // [85] phi from cputc::@4 to cputc::@3 [phi:cputc::@4->cputc::@3] __b3_from___b4: jmp __b3 // cputc::@3 __b3: - // [65] call cputln + // [86] call cputln jsr cputln jmp __breturn // cputc::@return __breturn: - // [66] return + // [87] return rts - // [67] phi from cputc to cputc::@1 [phi:cputc->cputc::@1] + // [88] phi from cputc to cputc::@1 [phi:cputc->cputc::@1] __b1_from_cputc: jmp __b1 // cputc::@1 __b1: - // [68] call cputln + // [89] call cputln jsr cputln jmp __breturn } // cputln // Print a newline cputln: { - // [69] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $20 -- pbuz1=pbuz1_plus_vbuc1 + // [90] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $20 -- pbuz1=pbuz1_plus_vbuc1 lda #$20 clc adc.z conio_line_text @@ -4439,69 +6735,66 @@ cputln: { bcc !+ inc.z conio_line_text+1 !: - // [70] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1 + // [91] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta.z conio_cursor_x - // [71] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y -- vbuz1=_inc_vbuz1 + // [92] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y -- vbuz1=_inc_vbuz1 inc.z conio_cursor_y - // [72] call cscroll + // [93] call cscroll jsr cscroll jmp __breturn // cputln::@return __breturn: - // [73] return + // [94] return rts } // cscroll // Scroll the entire screen if the cursor is beyond the last line cscroll: { - .label line2 = 9 // Scroll lines up - .label line1 = 3 - .label y = 2 - // [74] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return -- vbuz1_neq_vbuc1_then_la1 + .label line1 = $17 + .label line2 = $f + // [95] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return -- vbuz1_neq_vbuc1_then_la1 lda #$1e cmp.z conio_cursor_y bne __breturn - // [75] phi from cscroll to cscroll::@1 [phi:cscroll->cscroll::@1] + // [96] phi from cscroll to cscroll::@1 [phi:cscroll->cscroll::@1] __b1_from_cscroll: - // [75] phi (byte*) cscroll::line1#6 = (const nomodify byte*) PPU_NAME_TABLE_0 [phi:cscroll->cscroll::@1#0] -- pbuz1=pbuc1 + // [96] phi (byte*) cscroll::line1#2 = (const nomodify byte*) PPU_NAME_TABLE_0 [phi:cscroll->cscroll::@1#0] -- pbuz1=pbuc1 lda #PPU_NAME_TABLE_0 sta.z line1+1 - // [75] phi (byte*) cscroll::line2#6 = (const nomodify byte*) PPU_NAME_TABLE_0+(byte) $20 [phi:cscroll->cscroll::@1#1] -- pbuz1=pbuc1 + // [96] phi (byte*) cscroll::line2#2 = (const nomodify byte*) PPU_NAME_TABLE_0+(byte) $20 [phi:cscroll->cscroll::@1#1] -- pbuz1=pbuc1 lda #PPU_NAME_TABLE_0+$20 sta.z line2+1 - // [75] phi (byte) cscroll::y#2 = (byte) 0 [phi:cscroll->cscroll::@1#2] -- vbuz1=vbuc1 - lda #0 - sta.z y + // [96] phi (byte) cscroll::y#2 = (byte) 0 [phi:cscroll->cscroll::@1#2] -- vbuxx=vbuc1 + ldx #0 jmp __b1 // cscroll::@1 __b1: - // [76] if((byte) cscroll::y#2<(byte)(number) $1e-(number) 1) goto cscroll::@3 -- vbuz1_lt_vbuc1_then_la1 - lda.z y - cmp #$1e-1 - bcc __b3_from___b1 - // [77] phi from cscroll::@1 to cscroll::@2 [phi:cscroll::@1->cscroll::@2] - __b2_from___b1: - jmp __b2 - // cscroll::@2 - __b2: - // [78] call ppuDataFill + // [97] if((byte) cscroll::y#2<(byte)(number) $1e-(number) 1) goto cscroll::@2 -- vbuxx_lt_vbuc1_then_la1 + cpx #$1e-1 + bcc __b2 + // [98] phi from cscroll::@1 to cscroll::@3 [phi:cscroll::@1->cscroll::@3] + __b3_from___b1: + jmp __b3 + // cscroll::@3 + __b3: + // [99] call ppuDataFill // Fill last line with space - // [109] phi from cscroll::@2 to ppuDataFill [phi:cscroll::@2->ppuDataFill] - ppuDataFill_from___b2: - // [109] phi (byte) ppuDataFill::val#10 = (byte) ' ' [phi:cscroll::@2->ppuDataFill#0] -- vbuxx=vbuc1 + // [136] phi from cscroll::@3 to ppuDataFill [phi:cscroll::@3->ppuDataFill] + ppuDataFill_from___b3: + // [136] phi (byte) ppuDataFill::val#10 = (byte) ' ' [phi:cscroll::@3->ppuDataFill#0] -- vbuxx=vbuc1 ldx #' ' - // [109] phi (word) ppuDataFill::size#5 = (byte) $20 [phi:cscroll::@2->ppuDataFill#1] -- vwuz1=vbuc1 + // [136] phi (word) ppuDataFill::size#5 = (byte) $20 [phi:cscroll::@3->ppuDataFill#1] -- vwuz1=vbuc1 lda #<$20 sta.z ppuDataFill.size lda #>$20 sta.z ppuDataFill.size+1 - // [109] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0+(word)(number) $1e*(number) $20-(byte) $20 [phi:cscroll::@2->ppuDataFill#2] -- pvoz1=pvoc1 + // [136] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0+(word)(number) $1e*(number) $20-(byte) $20 [phi:cscroll::@3->ppuDataFill#2] -- pvoz1=pvoc1 lda #PPU_NAME_TABLE_0+$1e*$20-$20 @@ -4510,7 +6803,7 @@ cscroll: { jmp __b6 // cscroll::@6 __b6: - // [79] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $20 -- pbuz1=pbuz1_minus_vbuc1 + // [100] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $20 -- pbuz1=pbuz1_minus_vbuc1 sec lda.z conio_line_text sbc #$20 @@ -4518,168 +6811,265 @@ cscroll: { lda.z conio_line_text+1 sbc #0 sta.z conio_line_text+1 - // [80] (byte) conio_cursor_y ← -- (byte) conio_cursor_y -- vbuz1=_dec_vbuz1 + // [101] (byte) conio_cursor_y ← -- (byte) conio_cursor_y -- vbuz1=_dec_vbuz1 dec.z conio_cursor_y jmp __breturn // cscroll::@return __breturn: - // [81] return + // [102] return rts - // [82] phi from cscroll::@1 to cscroll::@3 [phi:cscroll::@1->cscroll::@3] - __b3_from___b1: - // [82] phi (byte*) cscroll::line1#2 = (byte*) cscroll::line1#6 [phi:cscroll::@1->cscroll::@3#0] -- register_copy - // [82] phi (byte*) cscroll::line2#2 = (byte*) cscroll::line2#6 [phi:cscroll::@1->cscroll::@3#1] -- register_copy - // [82] phi (byte) cscroll::x#2 = (byte) 0 [phi:cscroll::@1->cscroll::@3#2] -- vbuyy=vbuc1 - ldy #0 - jmp __b3 - // cscroll::@3 - __b3: - // [83] if((byte) cscroll::x#2<(byte) $20) goto cscroll::@4 -- vbuyy_lt_vbuc1_then_la1 - cpy #$20 - bcc __b4 + // cscroll::@2 + __b2: + // [103] (nomodify void*) ppuDataFetch::ppuData#0 ← (void*)(byte*) cscroll::line2#2 -- pvoz1=pvoz2 + lda.z line2 + sta.z ppuDataFetch.ppuData + lda.z line2+1 + sta.z ppuDataFetch.ppuData+1 + // [104] call ppuDataFetch + // [123] phi from cscroll::@2 to ppuDataFetch [phi:cscroll::@2->ppuDataFetch] + ppuDataFetch_from___b2: + jsr ppuDataFetch + jmp __b4 + // cscroll::@4 + __b4: + // [105] (nomodify void*) ppuDataTransfer::ppuData#0 ← (void*)(byte*) cscroll::line1#2 -- pvoz1=pvoz2 + lda.z line1 + sta.z ppuDataTransfer.ppuData + lda.z line1+1 + sta.z ppuDataTransfer.ppuData+1 + // [106] call ppuDataTransfer + // [110] phi from cscroll::@4 to ppuDataTransfer [phi:cscroll::@4->ppuDataTransfer] + ppuDataTransfer_from___b4: + // [110] phi (word) ppuDataTransfer::size#3 = (byte) $20 [phi:cscroll::@4->ppuDataTransfer#0] -- vwuz1=vbuc1 + lda #<$20 + sta.z ppuDataTransfer.size + lda #>$20 + sta.z ppuDataTransfer.size+1 + // [110] phi (nomodify void*) ppuDataTransfer::cpuData#2 = (void*)(const byte*) scroll_buffer [phi:cscroll::@4->ppuDataTransfer#1] -- pvoz1=pvoc1 + lda #scroll_buffer + sta.z ppuDataTransfer.cpuData+1 + // [110] phi (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 = (nomodify void*) ppuDataTransfer::ppuData#0 [phi:cscroll::@4->ppuDataTransfer#2] -- register_copy + jsr ppuDataTransfer jmp __b5 // cscroll::@5 __b5: - // [84] (byte) cscroll::y#1 ← ++ (byte) cscroll::y#2 -- vbuz1=_inc_vbuz1 - inc.z y - // [75] phi from cscroll::@5 to cscroll::@1 [phi:cscroll::@5->cscroll::@1] - __b1_from___b5: - // [75] phi (byte*) cscroll::line1#6 = (byte*) cscroll::line1#2 [phi:cscroll::@5->cscroll::@1#0] -- register_copy - // [75] phi (byte*) cscroll::line2#6 = (byte*) cscroll::line2#2 [phi:cscroll::@5->cscroll::@1#1] -- register_copy - // [75] phi (byte) cscroll::y#2 = (byte) cscroll::y#1 [phi:cscroll::@5->cscroll::@1#2] -- register_copy - jmp __b1 - // cscroll::@4 - __b4: - // [85] (nomodify void*) ppuDataGet::ppuData#0 ← (void*)(byte*) cscroll::line2#2 -- pvoz1=pvoz2 - lda.z line2 - sta.z ppuDataGet.ppuData - lda.z line2+1 - sta.z ppuDataGet.ppuData+1 - // [86] call ppuDataGet - // [102] phi from cscroll::@4 to ppuDataGet [phi:cscroll::@4->ppuDataGet] - ppuDataGet_from___b4: - jsr ppuDataGet - // [87] (byte) ppuDataGet::return#2 ← (byte) ppuDataGet::ppuDataRead1_return#0 - jmp __b7 - // cscroll::@7 - __b7: - // [88] (byte) cscroll::ch#0 ← (byte) ppuDataGet::return#2 -- vbuxx=vbuaa - tax - // [89] (byte*) cscroll::line2#1 ← ++ (byte*) cscroll::line2#2 -- pbuz1=_inc_pbuz1 - inc.z line2 - bne !+ - inc.z line2+1 - !: - // [90] (nomodify void*) ppuDataSet::ppuData#1 ← (void*)(byte*) cscroll::line1#2 -- pvoz1=pvoz2 - lda.z line1 - sta.z ppuDataSet.ppuData - lda.z line1+1 - sta.z ppuDataSet.ppuData+1 - // [91] (byte) ppuDataSet::val#1 ← (byte) cscroll::ch#0 - // [92] call ppuDataSet - // [95] phi from cscroll::@7 to ppuDataSet [phi:cscroll::@7->ppuDataSet] - ppuDataSet_from___b7: - // [95] phi (byte) ppuDataSet::val#2 = (byte) ppuDataSet::val#1 [phi:cscroll::@7->ppuDataSet#0] -- register_copy - // [95] phi (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 = (nomodify void*) ppuDataSet::ppuData#1 [phi:cscroll::@7->ppuDataSet#1] -- register_copy - jsr ppuDataSet - jmp __b8 - // cscroll::@8 - __b8: - // [93] (byte*) cscroll::line1#1 ← ++ (byte*) cscroll::line1#2 -- pbuz1=_inc_pbuz1 - inc.z line1 - bne !+ + // [107] (byte*) cscroll::line1#1 ← (byte*) cscroll::line1#2 + (byte) $20 -- pbuz1=pbuz1_plus_vbuc1 + lda #$20 + clc + adc.z line1 + sta.z line1 + bcc !+ inc.z line1+1 !: - // [94] (byte) cscroll::x#1 ← ++ (byte) cscroll::x#2 -- vbuyy=_inc_vbuyy - iny - // [82] phi from cscroll::@8 to cscroll::@3 [phi:cscroll::@8->cscroll::@3] - __b3_from___b8: - // [82] phi (byte*) cscroll::line1#2 = (byte*) cscroll::line1#1 [phi:cscroll::@8->cscroll::@3#0] -- register_copy - // [82] phi (byte*) cscroll::line2#2 = (byte*) cscroll::line2#1 [phi:cscroll::@8->cscroll::@3#1] -- register_copy - // [82] phi (byte) cscroll::x#2 = (byte) cscroll::x#1 [phi:cscroll::@8->cscroll::@3#2] -- register_copy - jmp __b3 + // [108] (byte*) cscroll::line2#1 ← (byte*) cscroll::line2#2 + (byte) $20 -- pbuz1=pbuz1_plus_vbuc1 + lda #$20 + clc + adc.z line2 + sta.z line2 + bcc !+ + inc.z line2+1 + !: + // [109] (byte) cscroll::y#1 ← ++ (byte) cscroll::y#2 -- vbuxx=_inc_vbuxx + inx + // [96] phi from cscroll::@5 to cscroll::@1 [phi:cscroll::@5->cscroll::@1] + __b1_from___b5: + // [96] phi (byte*) cscroll::line1#2 = (byte*) cscroll::line1#1 [phi:cscroll::@5->cscroll::@1#0] -- register_copy + // [96] phi (byte*) cscroll::line2#2 = (byte*) cscroll::line2#1 [phi:cscroll::@5->cscroll::@1#1] -- register_copy + // [96] phi (byte) cscroll::y#2 = (byte) cscroll::y#1 [phi:cscroll::@5->cscroll::@1#2] -- register_copy + jmp __b1 } - // ppuDataSet -// Set one byte in PPU memory + // ppuDataTransfer +// Transfer a number of bytes from the CPU memory to the PPU memory +// - cpuData : Pointer to the CPU memory (RAM of ROM) // - ppuData : Pointer in the PPU memory -// - val : The value to set -// ppuDataSet(byte* zp(5) ppuData, byte register(X) val) -ppuDataSet: { +// - size : The number of bytes to transfer +// ppuDataTransfer(void* zp(5) ppuData, void* zp(7) cpuData, word zp(9) size) +ppuDataTransfer: { .label ppuDataPrepare1_ppuData = 5 + .label cpuSrc = 7 + .label i = $b .label ppuData = 5 + .label cpuData = 7 + .label size = 9 jmp ppuDataPrepare1 - // ppuDataSet::ppuDataPrepare1 + // ppuDataTransfer::ppuDataPrepare1 ppuDataPrepare1: - // [96] (byte~) ppuDataSet::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 -- vbuaa=_hi_pvoz1 + // [111] (byte~) ppuDataTransfer::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 -- vbuaa=_hi_pvoz1 lda.z ppuDataPrepare1_ppuData+1 - // [97] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa + // [112] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - // [98] (byte~) ppuDataSet::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 -- vbuaa=_lo_pvoz1 + // [113] (byte~) ppuDataTransfer::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 -- vbuaa=_lo_pvoz1 lda.z ppuDataPrepare1_ppuData - // [99] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuaa + // [114] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuaa sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + jmp __b3 + // ppuDataTransfer::@3 + __b3: + // [115] (byte*) ppuDataTransfer::cpuSrc#6 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 + // [116] phi from ppuDataTransfer::@3 to ppuDataTransfer::@1 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1] + __b1_from___b3: + // [116] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*) ppuDataTransfer::cpuSrc#6 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#0] -- register_copy + // [116] phi (word) ppuDataTransfer::i#2 = (word) 0 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#1] -- vwuz1=vwuc1 + lda #<0 + sta.z i + lda #>0 + sta.z i+1 + jmp __b1 + // ppuDataTransfer::@1 + __b1: + // [117] if((word) ppuDataTransfer::i#2<(word) ppuDataTransfer::size#3) goto ppuDataTransfer::@2 -- vwuz1_lt_vwuz2_then_la1 + lda.z i+1 + cmp.z size+1 + bcc __b2 + bne !+ + lda.z i + cmp.z size + bcc __b2 + !: + jmp __breturn + // ppuDataTransfer::@return + __breturn: + // [118] return + rts + // ppuDataTransfer::@2 + __b2: + // [119] (byte) ppuDataTransfer::ppuDataPut1_val#0 ← *((byte*) ppuDataTransfer::cpuSrc#2) -- vbuaa=_deref_pbuz1 + ldy #0 + lda (cpuSrc),y jmp ppuDataPut1 - // ppuDataSet::ppuDataPut1 + // ppuDataTransfer::ppuDataPut1 ppuDataPut1: - // [100] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataSet::val#2 -- _deref_pbuc1=vbuxx - stx PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA - jmp __breturn - // ppuDataSet::@return - __breturn: - // [101] return - rts + // [120] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 -- _deref_pbuc1=vbuaa + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + jmp __b4 + // ppuDataTransfer::@4 + __b4: + // [121] (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#2 -- pbuz1=_inc_pbuz1 + inc.z cpuSrc + bne !+ + inc.z cpuSrc+1 + !: + // [122] (word) ppuDataTransfer::i#1 ← ++ (word) ppuDataTransfer::i#2 -- vwuz1=_inc_vwuz1 + inc.z i + bne !+ + inc.z i+1 + !: + // [116] phi from ppuDataTransfer::@4 to ppuDataTransfer::@1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1] + __b1_from___b4: + // [116] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*) ppuDataTransfer::cpuSrc#1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1#0] -- register_copy + // [116] phi (word) ppuDataTransfer::i#2 = (word) ppuDataTransfer::i#1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1#1] -- register_copy + jmp __b1 } - // ppuDataGet -// Get one byte from PPU memory + // ppuDataFetch +// Transfer a number of bytes from the PPU memory to the CPU memory // - ppuData : Pointer in the PPU memory -// ppuDataGet(void* zp($11) ppuData) -ppuDataGet: { - .label ppuData = $11 +// - cpuData : Pointer to the CPU memory (RAM of ROM) +// - size : The number of bytes to transfer +// ppuDataFetch(void* zp($19) ppuData) +ppuDataFetch: { + .const size = $20 + .label cpuData = scroll_buffer + // Fetch from PPU to CPU + .label cpuDst = 7 + .label i = 5 + .label ppuData = $19 jmp ppuDataPrepare1 - // ppuDataGet::ppuDataPrepare1 + // ppuDataFetch::ppuDataPrepare1 ppuDataPrepare1: - // [103] (byte~) ppuDataGet::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataGet::ppuData#0 -- vbuaa=_hi_pvoz1 + // [124] (byte~) ppuDataFetch::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFetch::ppuData#0 -- vbuaa=_hi_pvoz1 lda.z ppuData+1 - // [104] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataGet::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa + // [125] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFetch::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - // [105] (byte~) ppuDataGet::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataGet::ppuData#0 -- vbuaa=_lo_pvoz1 + // [126] (byte~) ppuDataFetch::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFetch::ppuData#0 -- vbuaa=_lo_pvoz1 lda.z ppuData - // [106] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataGet::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuaa + // [127] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFetch::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuaa sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - jmp ppuDataRead1 - // ppuDataGet::ppuDataRead1 - ppuDataRead1: - // [107] (byte) ppuDataGet::ppuDataRead1_return#0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) -- vbuaa=_deref_pbuc1 - lda PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + jmp __b2 + // ppuDataFetch::@2 + __b2: + // asm { ldaPPU_PPUDATA } + // Perform a dummy-read to discard the current value in the data read buffer and update it with the first byte from the PPU address + lda PPU_PPUDATA + // [129] phi from ppuDataFetch::@2 to ppuDataFetch::@1 [phi:ppuDataFetch::@2->ppuDataFetch::@1] + __b1_from___b2: + // [129] phi (byte*) ppuDataFetch::cpuDst#2 = (byte*)(const nomodify void*) ppuDataFetch::cpuData#0 [phi:ppuDataFetch::@2->ppuDataFetch::@1#0] -- pbuz1=pbuc1 + lda #cpuData + sta.z cpuDst+1 + // [129] phi (word) ppuDataFetch::i#2 = (word) 0 [phi:ppuDataFetch::@2->ppuDataFetch::@1#1] -- vwuz1=vwuc1 + lda #<0 + sta.z i + lda #>0 + sta.z i+1 + jmp __b1 + // ppuDataFetch::@1 + __b1: + // [130] if((word) ppuDataFetch::i#2<(const word) ppuDataFetch::size#0) goto ppuDataFetch::ppuDataRead1 -- vwuz1_lt_vwuc1_then_la1 + lda.z i+1 + cmp #>size + bcc ppuDataRead1 + bne !+ + lda.z i + cmp #ppuDataFetch::@1] + __b1_from___b3: + // [129] phi (byte*) ppuDataFetch::cpuDst#2 = (byte*) ppuDataFetch::cpuDst#1 [phi:ppuDataFetch::@3->ppuDataFetch::@1#0] -- register_copy + // [129] phi (word) ppuDataFetch::i#2 = (word) ppuDataFetch::i#1 [phi:ppuDataFetch::@3->ppuDataFetch::@1#1] -- register_copy + jmp __b1 } // ppuDataFill // Fill a number of bytes in the PPU memory // - ppuData : Pointer in the PPU memory // - size : The number of bytes to transfer -// ppuDataFill(byte register(X) val, word zp($11) size) +// ppuDataFill(byte register(X) val, word zp($b) size) ppuDataFill: { - .label ppuDataPrepare1_ppuData = 5 - .label i = 9 - .label size = $11 + .label ppuDataPrepare1_ppuData = 9 + .label i = $19 + .label size = $b jmp ppuDataPrepare1 // ppuDataFill::ppuDataPrepare1 ppuDataPrepare1: - // [110] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 -- vbuaa=_hi_pvoz1 + // [137] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 -- vbuaa=_hi_pvoz1 lda.z ppuDataPrepare1_ppuData+1 - // [111] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa + // [138] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - // [112] (byte~) ppuDataFill::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 -- vbuaa=_lo_pvoz1 + // [139] (byte~) ppuDataFill::ppuDataPrepare1_$1 ← < (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 -- vbuaa=_lo_pvoz1 lda.z ppuDataPrepare1_ppuData - // [113] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuaa + // [140] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuaa sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - // [114] phi from ppuDataFill::ppuDataPrepare1 to ppuDataFill::@1 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1] + // [141] phi from ppuDataFill::ppuDataPrepare1 to ppuDataFill::@1 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1] __b1_from_ppuDataPrepare1: - // [114] phi (word) ppuDataFill::i#2 = (word) 0 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1#0] -- vwuz1=vwuc1 + // [141] phi (word) ppuDataFill::i#2 = (word) 0 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1#0] -- vwuz1=vwuc1 lda #<0 sta.z i lda #>0 @@ -4688,7 +7078,7 @@ ppuDataFill: { // Transfer to PPU // ppuDataFill::@1 __b1: - // [115] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#5) goto ppuDataFill::ppuDataPut1 -- vwuz1_lt_vwuz2_then_la1 + // [142] if((word) ppuDataFill::i#2<(word) ppuDataFill::size#5) goto ppuDataFill::ppuDataPut1 -- vwuz1_lt_vwuz2_then_la1 lda.z i+1 cmp.z size+1 bcc ppuDataPut1 @@ -4700,39 +7090,387 @@ ppuDataFill: { jmp __breturn // ppuDataFill::@return __breturn: - // [116] return + // [143] return rts // ppuDataFill::ppuDataPut1 ppuDataPut1: - // [117] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataFill::val#10 -- _deref_pbuc1=vbuxx + // [144] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataFill::val#10 -- _deref_pbuc1=vbuxx stx PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA jmp __b2 // ppuDataFill::@2 __b2: - // [118] (word) ppuDataFill::i#1 ← ++ (word) ppuDataFill::i#2 -- vwuz1=_inc_vwuz1 + // [145] (word) ppuDataFill::i#1 ← ++ (word) ppuDataFill::i#2 -- vwuz1=_inc_vwuz1 inc.z i bne !+ inc.z i+1 !: - // [114] phi from ppuDataFill::@2 to ppuDataFill::@1 [phi:ppuDataFill::@2->ppuDataFill::@1] + // [141] phi from ppuDataFill::@2 to ppuDataFill::@1 [phi:ppuDataFill::@2->ppuDataFill::@1] __b1_from___b2: - // [114] phi (word) ppuDataFill::i#2 = (word) ppuDataFill::i#1 [phi:ppuDataFill::@2->ppuDataFill::@1#0] -- register_copy + // [141] phi (word) ppuDataFill::i#2 = (word) ppuDataFill::i#1 [phi:ppuDataFill::@2->ppuDataFill::@1#0] -- register_copy + jmp __b1 +} + // ppuDataSet +// Set one byte in PPU memory +// - ppuData : Pointer in the PPU memory +// - val : The value to set +// ppuDataSet(byte* zp($17) ppuData, byte register(A) val) +ppuDataSet: { + .label ppuData = $17 + jmp ppuDataPrepare1 + // ppuDataSet::ppuDataPrepare1 + ppuDataPrepare1: + // [147] (byte~) ppuDataSet::ppuDataPrepare1_$0 ← > (void*)(nomodify byte*) ppuDataSet::ppuData#0 -- vbuxx=_hi_pvoz1 + ldx.z ppuData+1 + // [148] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuxx + stx PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + // [149] (byte~) ppuDataSet::ppuDataPrepare1_$1 ← < (void*)(nomodify byte*) ppuDataSet::ppuData#0 -- vbuxx=_lo_pvoz1 + ldx.z ppuData + // [150] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$1 -- _deref_pbuc1=vbuxx + stx PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + jmp ppuDataPut1 + // ppuDataSet::ppuDataPut1 + ppuDataPut1: + // [151] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataSet::val#0 -- _deref_pbuc1=vbuaa + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + jmp __breturn + // ppuDataSet::@return + __breturn: + // [152] return + rts +} + // gotoxy +// Set the cursor to the specified position +// gotoxy(byte register(X) x, byte register(A) y) +gotoxy: { + .label __5 = $13 + .label __6 = $13 + .label line_offset = $13 + // [154] if((byte) gotoxy::y#4<(byte) $1e+(byte) 1) goto gotoxy::@3 -- vbuaa_lt_vbuc1_then_la1 + cmp #$1e+1 + bcc __b3_from_gotoxy + // [156] phi from gotoxy to gotoxy::@1 [phi:gotoxy->gotoxy::@1] + __b1_from_gotoxy: + // [156] phi (byte) gotoxy::y#5 = (byte) 0 [phi:gotoxy->gotoxy::@1#0] -- vbuaa=vbuc1 + lda #0 + jmp __b1 + // [155] phi from gotoxy to gotoxy::@3 [phi:gotoxy->gotoxy::@3] + __b3_from_gotoxy: + jmp __b3 + // gotoxy::@3 + __b3: + // [156] phi from gotoxy::@3 to gotoxy::@1 [phi:gotoxy::@3->gotoxy::@1] + __b1_from___b3: + // [156] phi (byte) gotoxy::y#5 = (byte) gotoxy::y#4 [phi:gotoxy::@3->gotoxy::@1#0] -- register_copy + jmp __b1 + // gotoxy::@1 + __b1: + // [157] if((byte) gotoxy::x#4<(byte) $20) goto gotoxy::@4 -- vbuxx_lt_vbuc1_then_la1 + cpx #$20 + bcc __b4_from___b1 + // [159] phi from gotoxy::@1 to gotoxy::@2 [phi:gotoxy::@1->gotoxy::@2] + __b2_from___b1: + // [159] phi (byte) gotoxy::x#5 = (byte) 0 [phi:gotoxy::@1->gotoxy::@2#0] -- vbuxx=vbuc1 + ldx #0 + jmp __b2 + // [158] phi from gotoxy::@1 to gotoxy::@4 [phi:gotoxy::@1->gotoxy::@4] + __b4_from___b1: + jmp __b4 + // gotoxy::@4 + __b4: + // [159] phi from gotoxy::@4 to gotoxy::@2 [phi:gotoxy::@4->gotoxy::@2] + __b2_from___b4: + // [159] phi (byte) gotoxy::x#5 = (byte) gotoxy::x#4 [phi:gotoxy::@4->gotoxy::@2#0] -- register_copy + jmp __b2 + // gotoxy::@2 + __b2: + // [160] (byte) conio_cursor_x ← (byte) gotoxy::x#5 -- vbuz1=vbuxx + stx.z conio_cursor_x + // [161] (byte) conio_cursor_y ← (byte) gotoxy::y#5 -- vbuz1=vbuaa + sta.z conio_cursor_y + // [162] (word~) gotoxy::$6 ← (word)(byte) gotoxy::y#5 -- vwuz1=_word_vbuaa + sta.z __6 + lda #0 + sta.z __6+1 + // [163] (word) gotoxy::line_offset#0 ← (word~) gotoxy::$6 << (byte) 5 -- vwuz1=vwuz1_rol_5 + asl.z line_offset + rol.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + // [164] (byte*~) gotoxy::$5 ← (const nomodify byte*) PPU_NAME_TABLE_0 + (word) gotoxy::line_offset#0 -- pbuz1=pbuc1_plus_vwuz1 + clc + lda.z __5 + adc #PPU_NAME_TABLE_0 + sta.z __5+1 + // [165] (byte*) conio_line_text ← (byte*~) gotoxy::$5 + jmp __breturn + // gotoxy::@return + __breturn: + // [166] return + rts +} + // cputsxy +// Move cursor and output a NUL-terminated string +// Same as "gotoxy (x, y); puts (s);" +// cputsxy(byte register(X) x, byte register(A) y) +cputsxy: { + // [167] (byte) gotoxy::x#3 ← (byte) cputsxy::x#0 + // [168] (byte) gotoxy::y#3 ← (byte) cputsxy::y#0 + // [169] call gotoxy + // [153] phi from cputsxy to gotoxy [phi:cputsxy->gotoxy] + gotoxy_from_cputsxy: + // [153] phi (byte) gotoxy::x#4 = (byte) gotoxy::x#3 [phi:cputsxy->gotoxy#0] -- register_copy + // [153] phi (byte) gotoxy::y#4 = (byte) gotoxy::y#3 [phi:cputsxy->gotoxy#1] -- register_copy + jsr gotoxy + // [170] phi from cputsxy to cputsxy::@1 [phi:cputsxy->cputsxy::@1] + __b1_from_cputsxy: + jmp __b1 + // cputsxy::@1 + __b1: + // [171] call cputs + // [173] phi from cputsxy::@1 to cputs [phi:cputsxy::@1->cputs] + cputs_from___b1: + jsr cputs + jmp __breturn + // cputsxy::@return + __breturn: + // [172] return + rts +} + // cputs +// Output a NUL-terminated string at the current cursor position +// cputs(byte* zp($d) s) +cputs: { + .label s = $d + // [174] phi from cputs to cputs::@1 [phi:cputs->cputs::@1] + __b1_from_cputs: + // [174] phi (to_nomodify byte*) cputs::s#2 = (const byte*) num_buffer [phi:cputs->cputs::@1#0] -- pbuz1=pbuc1 + lda #num_buffer + sta.z s+1 + jmp __b1 + // cputs::@1 + __b1: + // [175] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#2) -- vbuaa=_deref_pbuz1 + ldy #0 + lda (s),y + // [176] (to_nomodify byte*) cputs::s#0 ← ++ (to_nomodify byte*) cputs::s#2 -- pbuz1=_inc_pbuz1 + inc.z s + bne !+ + inc.z s+1 + !: + // [177] if((byte) 0!=(byte) cputs::c#1) goto cputs::@2 -- vbuc1_neq_vbuaa_then_la1 + cmp #0 + bne __b2 + jmp __breturn + // cputs::@return + __breturn: + // [178] return + rts + // cputs::@2 + __b2: + // [179] (byte) cputc::c#0 ← (byte) cputs::c#1 -- vbuxx=vbuaa + tax + // [180] call cputc + // [78] phi from cputs::@2 to cputc [phi:cputs::@2->cputc] + cputc_from___b2: + // [78] phi (byte) cputc::c#2 = (byte) cputc::c#0 [phi:cputs::@2->cputc#0] -- register_copy + jsr cputc + // [174] phi from cputs::@2 to cputs::@1 [phi:cputs::@2->cputs::@1] + __b1_from___b2: + // [174] phi (to_nomodify byte*) cputs::s#2 = (to_nomodify byte*) cputs::s#0 [phi:cputs::@2->cputs::@1#0] -- register_copy + jmp __b1 +} + // uctoa +// Converts unsigned number value to a string representing it in RADIX format. +// If the leading digits are zero they are not included in the string. +// - value : The number to be converted to RADIX +// - buffer : receives the string representing the number and zero-termination. +// - radix : The radix to convert the number to (from the enum RADIX) +// uctoa(byte register(X) value, byte* zp($f) buffer) +uctoa: { + .const max_digits = 2 + .label digit_value = $1b + .label buffer = $f + .label digit = $11 + .label started = $12 + // [182] phi from uctoa to uctoa::@1 [phi:uctoa->uctoa::@1] + __b1_from_uctoa: + // [182] phi (byte*) uctoa::buffer#11 = (const byte*) num_buffer [phi:uctoa->uctoa::@1#0] -- pbuz1=pbuc1 + lda #num_buffer + sta.z buffer+1 + // [182] phi (byte) uctoa::started#2 = (byte) 0 [phi:uctoa->uctoa::@1#1] -- vbuz1=vbuc1 + lda #0 + sta.z started + // [182] phi (byte) uctoa::value#2 = (byte) uctoa::value#1 [phi:uctoa->uctoa::@1#2] -- register_copy + // [182] phi (byte) uctoa::digit#2 = (byte) 0 [phi:uctoa->uctoa::@1#3] -- vbuz1=vbuc1 + lda #0 + sta.z digit + jmp __b1 + // uctoa::@1 + __b1: + // [183] if((byte) uctoa::digit#2<(const byte) uctoa::max_digits#2-(byte) 1) goto uctoa::@2 -- vbuz1_lt_vbuc1_then_la1 + lda.z digit + cmp #max_digits-1 + bcc __b2 + jmp __b3 + // uctoa::@3 + __b3: + // [184] *((byte*) uctoa::buffer#11) ← *((const byte*) DIGITS + (byte) uctoa::value#2) -- _deref_pbuz1=pbuc1_derefidx_vbuxx + lda DIGITS,x + ldy #0 + sta (buffer),y + // [185] (byte*) uctoa::buffer#3 ← ++ (byte*) uctoa::buffer#11 -- pbuz1=_inc_pbuz1 + inc.z buffer + bne !+ + inc.z buffer+1 + !: + // [186] *((byte*) uctoa::buffer#3) ← (byte) 0 -- _deref_pbuz1=vbuc1 + lda #0 + ldy #0 + sta (buffer),y + jmp __breturn + // uctoa::@return + __breturn: + // [187] return + rts + // uctoa::@2 + __b2: + // [188] (byte) uctoa::digit_value#0 ← *((const byte*) RADIX_HEXADECIMAL_VALUES_CHAR + (byte) uctoa::digit#2) -- vbuz1=pbuc1_derefidx_vbuz2 + ldy.z digit + lda RADIX_HEXADECIMAL_VALUES_CHAR,y + sta.z digit_value + // [189] if((byte) 0!=(byte) uctoa::started#2) goto uctoa::@5 -- vbuc1_neq_vbuz1_then_la1 + lda #0 + cmp.z started + bne __b5 + jmp __b7 + // uctoa::@7 + __b7: + // [190] if((byte) uctoa::value#2>=(byte) uctoa::digit_value#0) goto uctoa::@5 -- vbuxx_ge_vbuz1_then_la1 + cpx.z digit_value + bcs __b5 + // [191] phi from uctoa::@7 to uctoa::@4 [phi:uctoa::@7->uctoa::@4] + __b4_from___b7: + // [191] phi (byte*) uctoa::buffer#14 = (byte*) uctoa::buffer#11 [phi:uctoa::@7->uctoa::@4#0] -- register_copy + // [191] phi (byte) uctoa::started#4 = (byte) uctoa::started#2 [phi:uctoa::@7->uctoa::@4#1] -- register_copy + // [191] phi (byte) uctoa::value#6 = (byte) uctoa::value#2 [phi:uctoa::@7->uctoa::@4#2] -- register_copy + jmp __b4 + // uctoa::@4 + __b4: + // [192] (byte) uctoa::digit#1 ← ++ (byte) uctoa::digit#2 -- vbuz1=_inc_vbuz1 + inc.z digit + // [182] phi from uctoa::@4 to uctoa::@1 [phi:uctoa::@4->uctoa::@1] + __b1_from___b4: + // [182] phi (byte*) uctoa::buffer#11 = (byte*) uctoa::buffer#14 [phi:uctoa::@4->uctoa::@1#0] -- register_copy + // [182] phi (byte) uctoa::started#2 = (byte) uctoa::started#4 [phi:uctoa::@4->uctoa::@1#1] -- register_copy + // [182] phi (byte) uctoa::value#2 = (byte) uctoa::value#6 [phi:uctoa::@4->uctoa::@1#2] -- register_copy + // [182] phi (byte) uctoa::digit#2 = (byte) uctoa::digit#1 [phi:uctoa::@4->uctoa::@1#3] -- register_copy + jmp __b1 + // uctoa::@5 + __b5: + // [193] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#11 + // [194] (byte) uctoa_append::value#0 ← (byte) uctoa::value#2 + // [195] (byte) uctoa_append::sub#0 ← (byte) uctoa::digit_value#0 + // [196] call uctoa_append + // [200] phi from uctoa::@5 to uctoa_append [phi:uctoa::@5->uctoa_append] + uctoa_append_from___b5: + jsr uctoa_append + // [197] (byte) uctoa_append::return#0 ← (byte) uctoa_append::value#2 + jmp __b6 + // uctoa::@6 + __b6: + // [198] (byte) uctoa::value#0 ← (byte) uctoa_append::return#0 + // [199] (byte*) uctoa::buffer#4 ← ++ (byte*) uctoa::buffer#11 -- pbuz1=_inc_pbuz1 + inc.z buffer + bne !+ + inc.z buffer+1 + !: + // [191] phi from uctoa::@6 to uctoa::@4 [phi:uctoa::@6->uctoa::@4] + __b4_from___b6: + // [191] phi (byte*) uctoa::buffer#14 = (byte*) uctoa::buffer#4 [phi:uctoa::@6->uctoa::@4#0] -- register_copy + // [191] phi (byte) uctoa::started#4 = (byte) 1 [phi:uctoa::@6->uctoa::@4#1] -- vbuz1=vbuc1 + lda #1 + sta.z started + // [191] phi (byte) uctoa::value#6 = (byte) uctoa::value#0 [phi:uctoa::@6->uctoa::@4#2] -- register_copy + jmp __b4 +} + // uctoa_append +// Used to convert a single digit of an unsigned number value to a string representation +// Counts a single digit up from '0' as long as the value is larger than sub. +// Each time the digit is increased sub is subtracted from value. +// - buffer : pointer to the char that receives the digit +// - value : The value where the digit will be derived from +// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. +// (For decimal the subs used are 10000, 1000, 100, 10, 1) +// returns : the value reduced by sub * digit so that it is less than sub. +// uctoa_append(byte* zp($f) buffer, byte register(X) value, byte zp($1b) sub) +uctoa_append: { + .label buffer = $f + .label sub = $1b + // [201] phi from uctoa_append to uctoa_append::@1 [phi:uctoa_append->uctoa_append::@1] + __b1_from_uctoa_append: + // [201] phi (byte) uctoa_append::digit#2 = (byte) 0 [phi:uctoa_append->uctoa_append::@1#0] -- vbuyy=vbuc1 + ldy #0 + // [201] phi (byte) uctoa_append::value#2 = (byte) uctoa_append::value#0 [phi:uctoa_append->uctoa_append::@1#1] -- register_copy + jmp __b1 + // uctoa_append::@1 + __b1: + // [202] if((byte) uctoa_append::value#2>=(byte) uctoa_append::sub#0) goto uctoa_append::@2 -- vbuxx_ge_vbuz1_then_la1 + cpx.z sub + bcs __b2 + jmp __b3 + // uctoa_append::@3 + __b3: + // [203] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuyy + lda DIGITS,y + ldy #0 + sta (buffer),y + jmp __breturn + // uctoa_append::@return + __breturn: + // [204] return + rts + // uctoa_append::@2 + __b2: + // [205] (byte) uctoa_append::digit#1 ← ++ (byte) uctoa_append::digit#2 -- vbuyy=_inc_vbuyy + iny + // [206] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0 -- vbuxx=vbuxx_minus_vbuz1 + txa + sec + sbc.z sub + tax + // [201] phi from uctoa_append::@2 to uctoa_append::@1 [phi:uctoa_append::@2->uctoa_append::@1] + __b1_from___b2: + // [201] phi (byte) uctoa_append::digit#2 = (byte) uctoa_append::digit#1 [phi:uctoa_append::@2->uctoa_append::@1#0] -- register_copy + // [201] phi (byte) uctoa_append::value#2 = (byte) uctoa_append::value#1 [phi:uctoa_append::@2->uctoa_append::@1#1] -- register_copy jmp __b1 } // clrscr // clears the screen and moves the cursor to the upper left-hand corner of the screen. clrscr: { - // [120] call ppuDataFill - // [109] phi from clrscr to ppuDataFill [phi:clrscr->ppuDataFill] + // [208] call ppuDataFill + // [136] phi from clrscr to ppuDataFill [phi:clrscr->ppuDataFill] ppuDataFill_from_clrscr: - // [109] phi (byte) ppuDataFill::val#10 = (byte) ' ' [phi:clrscr->ppuDataFill#0] -- vbuxx=vbuc1 + // [136] phi (byte) ppuDataFill::val#10 = (byte) ' ' [phi:clrscr->ppuDataFill#0] -- vbuxx=vbuc1 ldx #' ' - // [109] phi (word) ppuDataFill::size#5 = (word) $3c0 [phi:clrscr->ppuDataFill#1] -- vwuz1=vwuc1 + // [136] phi (word) ppuDataFill::size#5 = (word) $3c0 [phi:clrscr->ppuDataFill#1] -- vwuz1=vwuc1 lda #<$3c0 sta.z ppuDataFill.size lda #>$3c0 sta.z ppuDataFill.size+1 - // [109] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0 [phi:clrscr->ppuDataFill#2] -- pvoz1=pvoc1 + // [136] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0 [phi:clrscr->ppuDataFill#2] -- pvoz1=pvoc1 lda #PPU_NAME_TABLE_0 @@ -4741,13 +7479,13 @@ clrscr: { jmp __b1 // clrscr::@1 __b1: - // [121] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1 + // [209] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta.z conio_cursor_x - // [122] (byte) conio_cursor_y ← (byte) 0 -- vbuz1=vbuc1 + // [210] (byte) conio_cursor_y ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta.z conio_cursor_y - // [123] (byte*) conio_line_text ← (const nomodify byte*) PPU_NAME_TABLE_0 -- pbuz1=pbuc1 + // [211] (byte*) conio_line_text ← (const nomodify byte*) PPU_NAME_TABLE_0 -- pbuz1=pbuc1 lda #PPU_NAME_TABLE_0 @@ -4755,87 +7493,8 @@ clrscr: { jmp __breturn // clrscr::@return __breturn: - // [124] return + // [212] return rts -} - // ppuDataTransfer -// Transfer a number of bytes from the CPU memory to the PPU memory -// - cpuData : Pointer to the CPU memory (RAM of ROM) -// - ppuData : Pointer in the PPU memory -// - size : The number of bytes to transfer -ppuDataTransfer: { - .const size = $20*SIZEOF_BYTE - .label ppuData = PPU_PALETTE - .label cpuData = PALETTE - // Transfer to PPU - .label cpuSrc = 9 - .label i = 7 - jmp ppuDataPrepare1 - // ppuDataTransfer::ppuDataPrepare1 - ppuDataPrepare1: - // [126] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← >(const nomodify void*) ppuDataTransfer::ppuData#0 -- _deref_pbuc1=vbuc2 - lda #>ppuData - sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - // [127] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte) 0 -- _deref_pbuc1=vbuc2 - lda #0 - sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - // [128] phi from ppuDataTransfer::ppuDataPrepare1 to ppuDataTransfer::@1 [phi:ppuDataTransfer::ppuDataPrepare1->ppuDataTransfer::@1] - __b1_from_ppuDataPrepare1: - // [128] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*)(const nomodify void*) ppuDataTransfer::cpuData#0 [phi:ppuDataTransfer::ppuDataPrepare1->ppuDataTransfer::@1#0] -- pbuz1=pbuc1 - lda #cpuData - sta.z cpuSrc+1 - // [128] phi (word) ppuDataTransfer::i#2 = (word) 0 [phi:ppuDataTransfer::ppuDataPrepare1->ppuDataTransfer::@1#1] -- vwuz1=vwuc1 - lda #<0 - sta.z i - lda #>0 - sta.z i+1 - jmp __b1 - // ppuDataTransfer::@1 - __b1: - // [129] if((word) ppuDataTransfer::i#2<(const word) ppuDataTransfer::size#0) goto ppuDataTransfer::@2 -- vwuz1_lt_vwuc1_then_la1 - lda.z i+1 - cmp #>size - bcc __b2 - bne !+ - lda.z i - cmp #ppuDataTransfer::@1] - __b1_from___b3: - // [128] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*) ppuDataTransfer::cpuSrc#1 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#0] -- register_copy - // [128] phi (word) ppuDataTransfer::i#2 = (word) ppuDataTransfer::i#1 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#1] -- register_copy - jmp __b1 } // vblank // NMI Called when the PPU refreshes the screen (also known as the V-Blank period) @@ -4846,100 +7505,100 @@ vblank: { pha tya pha - // [136] call readJoy1 + // [214] call readJoy1 jsr readJoy1 - // [137] (byte) readJoy1::return#2 ← (byte) readJoy1::joy#2 + // [215] (byte) readJoy1::return#2 ← (byte) readJoy1::joy#2 jmp __b11 // vblank::@11 __b11: - // [138] (byte) vblank::joy#0 ← (byte) readJoy1::return#2 -- vbuxx=vbuaa + // [216] (byte) vblank::joy#0 ← (byte) readJoy1::return#2 -- vbuxx=vbuaa tax - // [139] (byte~) vblank::$1 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_DOWN -- vbuaa=vbuxx_band_vbuc1 + // [217] (byte~) vblank::$1 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_DOWN -- vbuaa=vbuxx_band_vbuc1 txa and #JOY_DOWN - // [140] if((byte) 0==(byte~) vblank::$1) goto vblank::@1 -- vbuc1_eq_vbuaa_then_la1 + // [218] if((byte) 0==(byte~) vblank::$1) goto vblank::@1 -- vbuc1_eq_vbuaa_then_la1 cmp #0 beq __b1 jmp __b5 // vblank::@5 __b5: - // [141] (volatile byte) y_scroll ← ++ (volatile byte) y_scroll -- vbuz1=_inc_vbuz1 + // [219] (volatile byte) y_scroll ← ++ (volatile byte) y_scroll -- vbuz1=_inc_vbuz1 inc.z y_scroll - // [142] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 -- vbuz1_neq_vbuc1_then_la1 + // [220] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$f0 cmp.z y_scroll bne __b1 jmp __b6 // vblank::@6 __b6: - // [143] (volatile byte) y_scroll ← (byte) 0 -- vbuz1=vbuc1 + // [221] (volatile byte) y_scroll ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta.z y_scroll jmp __b1 // vblank::@1 __b1: - // [144] (byte~) vblank::$3 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_UP -- vbuaa=vbuxx_band_vbuc1 + // [222] (byte~) vblank::$3 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_UP -- vbuaa=vbuxx_band_vbuc1 txa and #JOY_UP - // [145] if((byte) 0==(byte~) vblank::$3) goto vblank::@2 -- vbuc1_eq_vbuaa_then_la1 + // [223] if((byte) 0==(byte~) vblank::$3) goto vblank::@2 -- vbuc1_eq_vbuaa_then_la1 cmp #0 beq __b2 jmp __b7 // vblank::@7 __b7: - // [146] (volatile byte) y_scroll ← -- (volatile byte) y_scroll -- vbuz1=_dec_vbuz1 + // [224] (volatile byte) y_scroll ← -- (volatile byte) y_scroll -- vbuz1=_dec_vbuz1 dec.z y_scroll - // [147] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 -- vbuz1_neq_vbuc1_then_la1 + // [225] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$ff cmp.z y_scroll bne __b2 jmp __b8 // vblank::@8 __b8: - // [148] (volatile byte) y_scroll ← (byte) $ef -- vbuz1=vbuc1 + // [226] (volatile byte) y_scroll ← (byte) $ef -- vbuz1=vbuc1 lda #$ef sta.z y_scroll jmp __b2 // vblank::@2 __b2: - // [149] (byte~) vblank::$5 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_LEFT -- vbuaa=vbuxx_band_vbuc1 + // [227] (byte~) vblank::$5 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_LEFT -- vbuaa=vbuxx_band_vbuc1 txa and #JOY_LEFT - // [150] if((byte) 0==(byte~) vblank::$5) goto vblank::@3 -- vbuc1_eq_vbuaa_then_la1 + // [228] if((byte) 0==(byte~) vblank::$5) goto vblank::@3 -- vbuc1_eq_vbuaa_then_la1 cmp #0 beq __b3 jmp __b9 // vblank::@9 __b9: - // [151] (volatile byte) x_scroll ← ++ (volatile byte) x_scroll -- vbuz1=_inc_vbuz1 + // [229] (volatile byte) x_scroll ← ++ (volatile byte) x_scroll -- vbuz1=_inc_vbuz1 inc.z x_scroll jmp __b3 // vblank::@3 __b3: - // [152] (byte~) vblank::$7 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_RIGHT -- vbuaa=vbuxx_band_vbuc1 + // [230] (byte~) vblank::$7 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_RIGHT -- vbuaa=vbuxx_band_vbuc1 txa and #JOY_RIGHT - // [153] if((byte) 0==(byte~) vblank::$7) goto vblank::@4 -- vbuc1_eq_vbuaa_then_la1 + // [231] if((byte) 0==(byte~) vblank::$7) goto vblank::@4 -- vbuc1_eq_vbuaa_then_la1 cmp #0 beq __b4 jmp __b10 // vblank::@10 __b10: - // [154] (volatile byte) x_scroll ← -- (volatile byte) x_scroll -- vbuz1=_dec_vbuz1 + // [232] (volatile byte) x_scroll ← -- (volatile byte) x_scroll -- vbuz1=_dec_vbuz1 dec.z x_scroll jmp __b4 // vblank::@4 __b4: - // [155] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) x_scroll -- _deref_pbuc1=vbuz1 + // [233] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) x_scroll -- _deref_pbuc1=vbuz1 lda.z x_scroll sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL - // [156] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) y_scroll -- _deref_pbuc1=vbuz1 + // [234] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) y_scroll -- _deref_pbuc1=vbuz1 lda.z y_scroll sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL jmp __breturn // vblank::@return __breturn: - // [157] return - exit interrupt(HARDWARE_STACK) + // [235] return - exit interrupt(HARDWARE_STACK) pla tay pla @@ -4959,50 +7618,58 @@ vblank: { // - bit 6: B // - bit 7: A readJoy1: { - .label __1 = $13 - // [158] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 1 -- _deref_pbuc1=vbuc2 + .label __1 = $1c + // [236] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 1 -- _deref_pbuc1=vbuc2 // Latch the controller buttons lda #1 sta APU+OFFSET_STRUCT_RICOH_2A03_JOY1 - // [159] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [237] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta APU+OFFSET_STRUCT_RICOH_2A03_JOY1 - // [160] phi from readJoy1 to readJoy1::@1 [phi:readJoy1->readJoy1::@1] + // [238] phi from readJoy1 to readJoy1::@1 [phi:readJoy1->readJoy1::@1] __b1_from_readJoy1: - // [160] phi (byte) readJoy1::joy#2 = (byte) 0 [phi:readJoy1->readJoy1::@1#0] -- vbuaa=vbuc1 + // [238] phi (byte) readJoy1::joy#2 = (byte) 0 [phi:readJoy1->readJoy1::@1#0] -- vbuaa=vbuc1 lda #0 - // [160] phi (byte) readJoy1::i#2 = (byte) 0 [phi:readJoy1->readJoy1::@1#1] -- vbuxx=vbuc1 + // [238] phi (byte) readJoy1::i#2 = (byte) 0 [phi:readJoy1->readJoy1::@1#1] -- vbuxx=vbuc1 ldx #0 jmp __b1 // readJoy1::@1 __b1: - // [161] if((byte) readJoy1::i#2<(byte) 8) goto readJoy1::@2 -- vbuxx_lt_vbuc1_then_la1 + // [239] if((byte) readJoy1::i#2<(byte) 8) goto readJoy1::@2 -- vbuxx_lt_vbuc1_then_la1 cpx #8 bcc __b2 jmp __breturn // readJoy1::@return __breturn: - // [162] return + // [240] return rts // readJoy1::@2 __b2: - // [163] (byte~) readJoy1::$1 ← (byte) readJoy1::joy#2 << (byte) 1 -- vbuz1=vbuaa_rol_1 + // [241] (byte~) readJoy1::$1 ← (byte) readJoy1::joy#2 << (byte) 1 -- vbuz1=vbuaa_rol_1 asl sta.z __1 - // [164] (byte~) readJoy1::$2 ← *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) & (byte) 1 -- vbuaa=_deref_pbuc1_band_vbuc2 + // [242] (byte~) readJoy1::$2 ← *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) & (byte) 1 -- vbuaa=_deref_pbuc1_band_vbuc2 lda #1 and APU+OFFSET_STRUCT_RICOH_2A03_JOY1 - // [165] (byte) readJoy1::joy#1 ← (byte~) readJoy1::$1 | (byte~) readJoy1::$2 -- vbuaa=vbuz1_bor_vbuaa + // [243] (byte) readJoy1::joy#1 ← (byte~) readJoy1::$1 | (byte~) readJoy1::$2 -- vbuaa=vbuz1_bor_vbuaa ora.z __1 - // [166] (byte) readJoy1::i#1 ← ++ (byte) readJoy1::i#2 -- vbuxx=_inc_vbuxx + // [244] (byte) readJoy1::i#1 ← ++ (byte) readJoy1::i#2 -- vbuxx=_inc_vbuxx inx - // [160] phi from readJoy1::@2 to readJoy1::@1 [phi:readJoy1::@2->readJoy1::@1] + // [238] phi from readJoy1::@2 to readJoy1::@1 [phi:readJoy1::@2->readJoy1::@1] __b1_from___b2: - // [160] phi (byte) readJoy1::joy#2 = (byte) readJoy1::joy#1 [phi:readJoy1::@2->readJoy1::@1#0] -- register_copy - // [160] phi (byte) readJoy1::i#2 = (byte) readJoy1::i#1 [phi:readJoy1::@2->readJoy1::@1#1] -- register_copy + // [238] phi (byte) readJoy1::joy#2 = (byte) readJoy1::joy#1 [phi:readJoy1::@2->readJoy1::@1#0] -- register_copy + // [238] phi (byte) readJoy1::i#2 = (byte) readJoy1::i#1 [phi:readJoy1::@2->readJoy1::@1#1] -- register_copy jmp __b1 } // File Data +.segment Data + // The digits used for numbers + DIGITS: .text "0123456789abcdef" + // Values of hexadecimal digits + RADIX_HEXADECIMAL_VALUES_CHAR: .byte $10 +.segment GameRam + num_buffer: .fill $b, 0 + scroll_buffer: .fill $20, 0 .segment Data // Color Palette PALETTE: .byte 1, $21, $f, $30, 1, $21, $f, $30, 1, $21, $f, $30, 1, $21, $f, $30, 1, $f, $30, 8, 1, $f, $18, 8, 1, $30, $37, $1a, $f, $f, $f, $f @@ -5034,14 +7701,27 @@ Removing instruction jmp initNES1___b1 Removing instruction jmp initNES1_waitForVBlank2 Removing instruction jmp initNES1_waitForVBlank2___b1 Removing instruction jmp initNES1___b7 -Removing instruction jmp __b2 -Removing instruction jmp __b3 -Removing instruction jmp __b4 -Removing instruction jmp __b5 Removing instruction jmp __b6 +Removing instruction jmp __b12 +Removing instruction jmp __b13 +Removing instruction jmp __b14 +Removing instruction jmp screensizex1 Removing instruction jmp __b7 +Removing instruction jmp screensizey2 +Removing instruction jmp __b9 +Removing instruction jmp screensizey3 +Removing instruction jmp __b11 +Removing instruction jmp __b4 Removing instruction jmp enableVideoOutput1 -Removing instruction jmp __b1 +Removing instruction jmp __b5 +Removing instruction jmp __b17 +Removing instruction jmp __b18 +Removing instruction jmp screensizex2 +Removing instruction jmp __b10 +Removing instruction jmp __b16 +Removing instruction jmp screensizey1 +Removing instruction jmp __b8 +Removing instruction jmp __b15 Removing instruction jmp __b1 Removing instruction jmp __breturn Removing instruction jmp __b2 @@ -5051,30 +7731,49 @@ Removing instruction jmp __breturn Removing instruction jmp __b1 Removing instruction jmp __breturn Removing instruction jmp __b1 -Removing instruction jmp __b2 +Removing instruction jmp __b3 Removing instruction jmp __b6 Removing instruction jmp __breturn -Removing instruction jmp __b3 +Removing instruction jmp __b4 Removing instruction jmp __b5 -Removing instruction jmp __b7 -Removing instruction jmp __b8 Removing instruction jmp ppuDataPrepare1 +Removing instruction jmp __b3 +Removing instruction jmp __b1 +Removing instruction jmp __breturn Removing instruction jmp ppuDataPut1 -Removing instruction jmp __breturn +Removing instruction jmp __b4 Removing instruction jmp ppuDataPrepare1 -Removing instruction jmp ppuDataRead1 +Removing instruction jmp __b2 +Removing instruction jmp __b1 Removing instruction jmp __breturn +Removing instruction jmp __b3 Removing instruction jmp ppuDataPrepare1 Removing instruction jmp __b1 Removing instruction jmp __breturn Removing instruction jmp __b2 -Removing instruction jmp __b1 -Removing instruction jmp __breturn Removing instruction jmp ppuDataPrepare1 +Removing instruction jmp ppuDataPut1 +Removing instruction jmp __breturn +Removing instruction jmp __b3 +Removing instruction jmp __b1 +Removing instruction jmp __b4 +Removing instruction jmp __b2 +Removing instruction jmp __breturn Removing instruction jmp __b1 Removing instruction jmp __breturn -Removing instruction jmp ppuDataPut1 +Removing instruction jmp __b1 +Removing instruction jmp __breturn +Removing instruction jmp __b1 Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __b7 +Removing instruction jmp __b4 +Removing instruction jmp __b6 +Removing instruction jmp __b1 +Removing instruction jmp __b3 +Removing instruction jmp __breturn +Removing instruction jmp __b1 +Removing instruction jmp __breturn Removing instruction jmp __b11 Removing instruction jmp __b5 Removing instruction jmp __b6 @@ -5101,15 +7800,24 @@ Removing instruction lda #0 Removing instruction lda #0 Removing instruction lda #0 Removing instruction lda #0 +Replacing instruction lda.z i with TXA +Removing instruction lda #>0 +Removing instruction lda #>0 Removing instruction lda #>0 Removing instruction lda #0 -Removing instruction lda #>0 +Replacing instruction ldy #0 with TAY +Removing instruction lda #0 Replacing instruction ldx #0 with TAX Succesful ASM optimization Pass5UnnecesaryLoadElimination Replacing label initNES1_waitForVBlank1___b1 with initNES1_waitForVBlank1 Replacing label initNES1___b1_from_initNES1___b1 with initNES1___b1 Replacing label initNES1_waitForVBlank2___b1 with initNES1_waitForVBlank2 +Replacing label screensizey3 with __b11 +Replacing label screensizey2 with __b9 +Replacing label screensizex1 with __b7 Replacing label __b1_from_cputc with __b1 +Replacing label __b3_from_gotoxy with __b1 +Replacing label __b4_from___b1 with __b2 Removing instruction __b1: Removing instruction __b3_from___b2: Removing instruction main_from___b3: @@ -5119,17 +7827,33 @@ Removing instruction initNES1_waitForVBlank1___b1: Removing instruction initNES1___b1_from_initNES1___b1: Removing instruction initNES1_waitForVBlank2_from_initNES1___b1: Removing instruction initNES1_waitForVBlank2___b1: -Removing instruction __b2_from_initNES1___b7: -Removing instruction __b3_from___b2: -Removing instruction __b4_from___b3: -Removing instruction ppuDataFill_from___b4: -Removing instruction __b5_from___b4: -Removing instruction __b6_from___b5: -Removing instruction cputs_from___b6: -Removing instruction __b1_from_enableVideoOutput1: +Removing instruction __b6_from_initNES1___b7: +Removing instruction __b12_from___b6: +Removing instruction __b13_from___b12: +Removing instruction ppuDataFill_from___b13: +Removing instruction __b14_from___b13: +Removing instruction screensizex1: +Removing instruction screensizey2: +Removing instruction screensizey3: +Removing instruction __b5_from_enableVideoOutput1: +Removing instruction screensizex2_from___b2: +Removing instruction screensizex2: +Removing instruction screensizey1_from___b1: +Removing instruction screensizey1: Removing instruction __b3_from___b4: Removing instruction __b1_from_cputc: -Removing instruction __b2_from___b1: +Removing instruction __b3_from___b1: +Removing instruction __b1_from___b3: +Removing instruction __b3_from_gotoxy: +Removing instruction __b3: +Removing instruction __b1_from___b3: +Removing instruction __b4_from___b1: +Removing instruction __b4: +Removing instruction __b2_from___b4: +Removing instruction __b1_from_cputsxy: +Removing instruction cputs_from___b1: +Removing instruction __b4_from___b7: +Removing instruction uctoa_append_from___b5: Succesful ASM optimization Pass5RedundantLabelElimination Removing instruction __b2: Removing instruction __b3: @@ -5140,56 +7864,95 @@ Removing instruction initNES1_disableAudioOutput1: Removing instruction initNES1_clearVBlankFlag1: Removing instruction initNES1___b1_from_initNES1_waitForVBlank1___b1: Removing instruction initNES1___b7: -Removing instruction __b2: -Removing instruction ppuDataTransfer_from___b2: -Removing instruction __b3: -Removing instruction ppuDataFill_from___b3: -Removing instruction __b4: -Removing instruction __b5: -Removing instruction clrscr_from___b5: Removing instruction __b6: -Removing instruction __b7: +Removing instruction ppuDataTransfer_from___b6: +Removing instruction __b12: +Removing instruction ppuDataFill_from___b12: +Removing instruction __b13: +Removing instruction __b14: +Removing instruction clrscr_from___b14: +Removing instruction screensizex1_from___b14: +Removing instruction screensizey2_from___b7: +Removing instruction screensizey3_from___b9: +Removing instruction __b4: Removing instruction enableVideoOutput1: +Removing instruction __b5: +Removing instruction uctoa_from___b3: +Removing instruction __b17: +Removing instruction __b18: +Removing instruction screensizey3_from___b18: +Removing instruction cputcxy_from___b2: +Removing instruction __b10: +Removing instruction cputcxy_from___b10: +Removing instruction __b16: +Removing instruction screensizey2_from___b16: +Removing instruction cputcxy_from___b1: +Removing instruction __b8: +Removing instruction cputcxy_from___b8: +Removing instruction __b15: +Removing instruction screensizex1_from___b15: +Removing instruction gotoxy_from_cputcxy: Removing instruction __b1: -Removing instruction __b1_from_cputs: +Removing instruction cputc_from___b1: Removing instruction __breturn: -Removing instruction __b1_from___b2: Removing instruction __b2: Removing instruction ppuDataSet_from___b2: Removing instruction __b4: Removing instruction __b3: Removing instruction __breturn: Removing instruction __b1_from_cscroll: -Removing instruction __b2: -Removing instruction ppuDataFill_from___b2: +Removing instruction __b3: +Removing instruction ppuDataFill_from___b3: Removing instruction __b6: +Removing instruction ppuDataFetch_from___b2: +Removing instruction __b4: +Removing instruction ppuDataTransfer_from___b4: Removing instruction __b5: Removing instruction __b1_from___b5: -Removing instruction ppuDataGet_from___b4: -Removing instruction __b7: -Removing instruction ppuDataSet_from___b7: -Removing instruction __b8: -Removing instruction __b3_from___b8: Removing instruction ppuDataPrepare1: +Removing instruction __b3: +Removing instruction __breturn: Removing instruction ppuDataPut1: -Removing instruction __breturn: +Removing instruction __b4: +Removing instruction __b1_from___b4: Removing instruction ppuDataPrepare1: -Removing instruction ppuDataRead1: +Removing instruction __b2: +Removing instruction __b1_from___b2: Removing instruction __breturn: +Removing instruction __b3: +Removing instruction __b1_from___b3: Removing instruction ppuDataPrepare1: Removing instruction __b1_from_ppuDataPrepare1: Removing instruction __breturn: Removing instruction __b2: Removing instruction __b1_from___b2: +Removing instruction ppuDataPrepare1: +Removing instruction ppuDataPut1: +Removing instruction __breturn: +Removing instruction __b1_from_gotoxy: +Removing instruction __b2_from___b1: +Removing instruction __breturn: +Removing instruction gotoxy_from_cputsxy: +Removing instruction __b1: +Removing instruction __breturn: +Removing instruction __b1_from_cputs: +Removing instruction __breturn: +Removing instruction cputc_from___b2: +Removing instruction __b1_from___b2: +Removing instruction __b1_from_uctoa: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __b7: +Removing instruction __b1_from___b4: +Removing instruction __b6: +Removing instruction __b4_from___b6: +Removing instruction __b1_from_uctoa_append: +Removing instruction __b3: +Removing instruction __breturn: +Removing instruction __b1_from___b2: Removing instruction ppuDataFill_from_clrscr: Removing instruction __b1: Removing instruction __breturn: -Removing instruction ppuDataPrepare1: -Removing instruction __b1_from_ppuDataPrepare1: -Removing instruction __breturn: -Removing instruction ppuDataPut1: -Removing instruction __b3: -Removing instruction __b1_from___b3: Removing instruction __b11: Removing instruction __b5: Removing instruction __b6: @@ -5204,12 +7967,13 @@ Removing instruction __b1_from___b2: Succesful ASM optimization Pass5UnusedLabelElimination Replacing jump to rts with rts in jmp __breturn Succesful ASM optimization Pass5DoubleJumpElimination -Relabelling long label __b1_from___b1 to __b1 -Relabelling long label __b3_from___b1 to __b2 +Relabelling long label __b5_from___b5 to __b4 Succesful ASM optimization Pass5RelabelLongLabels Adding RTS to root block Succesful ASM optimization Pass5AddMainRts Removing instruction jmp initNES1___b1 +Removing instruction jmp __b1 +Removing instruction jmp __b2 Succesful ASM optimization Pass5NextJumpElimination Removing instruction lda #0 Succesful ASM optimization Pass5UnnecesaryLoadElimination @@ -5221,6 +7985,7 @@ FINAL SYMBOL TABLE (label) @begin (label) @end (const struct RICOH_2A03*) APU = (struct RICOH_2A03*) 16384 +(const byte*) DIGITS[] = (byte*) "0123456789abcdef"z (const nomodify byte*) FR_COUNTER = (byte*) 16407 (const nomodify byte) JOY_DOWN = (byte) 4 (const nomodify byte) JOY_LEFT = (byte) 2 @@ -5240,7 +8005,13 @@ FINAL SYMBOL TABLE (const nomodify byte*) PPU_ATTRIBUTE_TABLE_1 = (byte*) 10176 (const nomodify byte*) PPU_NAME_TABLE_0 = (byte*) 8192 (const nomodify byte*) PPU_PALETTE = (byte*) 16128 -(const to_volatile byte*) PPU_PPUSTATUS = (byte*) 8194 +(const nomodify to_volatile byte*) PPU_PPUDATA = (byte*) 8199 +(const nomodify to_volatile byte*) PPU_PPUSTATUS = (byte*) 8194 +(const byte) RADIX::BINARY = (number) 2 +(const byte) RADIX::DECIMAL = (number) $a +(const byte) RADIX::HEXADECIMAL = (number) $10 +(const byte) RADIX::OCTAL = (number) 8 +(const byte*) RADIX_HEXADECIMAL_VALUES_CHAR[] = { (byte) $10 } (byte) RICOH_2A03::DMC_FREQ (byte) RICOH_2A03::DMC_LEN (byte) RICOH_2A03::DMC_RAW @@ -5290,9 +8061,9 @@ FINAL SYMBOL TABLE (void()) clrscr() (label) clrscr::@1 (label) clrscr::@return -(byte) conio_cursor_x loadstore zp[1]:11 5189.185185185185 -(byte) conio_cursor_y loadstore zp[1]:12 64002.159999999996 -(byte*) conio_line_text loadstore zp[2]:13 45104.24489795918 +(byte) conio_cursor_x loadstore zp[1]:17 4375315.90625 +(byte) conio_cursor_y loadstore zp[1]:18 6.5306328755102046E7 +(byte*) conio_line_text loadstore zp[2]:19 4.9111335755555555E7 (void()) cputc((byte) cputc::c) (label) cputc::@1 (label) cputc::@2 @@ -5300,7 +8071,22 @@ FINAL SYMBOL TABLE (label) cputc::@4 (label) cputc::@return (byte) cputc::c -(byte) cputc::c#0 reg byte x 7001.0 +(byte) cputc::c#0 reg byte x 2000002.0 +(byte) cputc::c#1 reg byte x 2002.0 +(byte) cputc::c#2 reg byte x 7000334.666666666 +(void()) cputcxy((byte) cputcxy::x , (byte) cputcxy::y , (byte) cputcxy::c) +(label) cputcxy::@1 +(label) cputcxy::@return +(byte) cputcxy::c +(byte) cputcxy::c#4 reg byte y 250.25 +(byte) cputcxy::x +(byte) cputcxy::x#0 reg byte x 202.0 +(byte) cputcxy::x#1 reg byte x 202.0 +(byte) cputcxy::x#4 reg byte x 1203.0 +(byte) cputcxy::y +(byte) cputcxy::y#2 reg byte a 202.0 +(byte) cputcxy::y#3 reg byte a 202.0 +(byte) cputcxy::y#4 reg byte a 601.5 (void()) cputln() (label) cputln::@return (void()) cputs((to_nomodify byte*) cputs::s) @@ -5308,10 +8094,18 @@ FINAL SYMBOL TABLE (label) cputs::@2 (label) cputs::@return (byte) cputs::c -(byte) cputs::c#1 reg byte a 1001.0 +(byte) cputs::c#1 reg byte a 1000001.0 (to_nomodify byte*) cputs::s -(to_nomodify byte*) cputs::s#0 s zp[2]:7 500.5 -(to_nomodify byte*) cputs::s#2 s zp[2]:7 1501.5 +(to_nomodify byte*) cputs::s#0 s zp[2]:13 500000.5 +(to_nomodify byte*) cputs::s#2 s zp[2]:13 1500001.5 +(void()) cputsxy((byte) cputsxy::x , (byte) cputsxy::y , (to_nomodify byte*) cputsxy::s) +(label) cputsxy::@1 +(label) cputsxy::@return +(to_nomodify byte*) cputsxy::s +(byte) cputsxy::x +(byte) cputsxy::x#0 reg byte x 551.0 +(byte) cputsxy::y +(byte) cputsxy::y#0 reg byte a 551.0 (void()) cscroll() (label) cscroll::@1 (label) cscroll::@2 @@ -5319,34 +8113,59 @@ FINAL SYMBOL TABLE (label) cscroll::@4 (label) cscroll::@5 (label) cscroll::@6 -(label) cscroll::@7 -(label) cscroll::@8 (label) cscroll::@return -(byte) cscroll::ch -(byte) cscroll::ch#0 reg byte x 6.666666673333334E8 (byte*) cscroll::line1 -(byte*) cscroll::line1#1 line1 zp[2]:3 1.000000001E9 -(byte*) cscroll::line1#2 line1 zp[2]:3 2.0000000036363637E8 -(byte*) cscroll::line1#6 line1 zp[2]:3 1.00000001E8 +(byte*) cscroll::line1#1 line1 zp[2]:23 6.666666666673334E11 +(byte*) cscroll::line1#2 line1 zp[2]:23 3.333333333336667E11 (byte*) cscroll::line2 -(byte*) cscroll::line2#1 line2 zp[2]:9 3.333333336666667E8 -(byte*) cscroll::line2#2 line2 zp[2]:9 3.1428571485714287E8 -(byte*) cscroll::line2#6 line2 zp[2]:9 1.00000001E8 -(byte) cscroll::x -(byte) cscroll::x#1 reg byte y 2.000000002E9 -(byte) cscroll::x#2 reg byte y 2.72727273E8 +(byte*) cscroll::line2#1 line2 zp[2]:15 1.000000000001E12 +(byte*) cscroll::line2#2 line2 zp[2]:15 2.857142857145714E11 (byte) cscroll::y -(byte) cscroll::y#1 y zp[1]:2 2.00000002E8 -(byte) cscroll::y#2 y zp[1]:2 2.142857164285714E7 +(byte) cscroll::y#1 reg byte x 2.000000000002E12 +(byte) cscroll::y#2 reg byte x 3.75000000000375E11 +(void()) gotoxy((byte) gotoxy::x , (byte) gotoxy::y) +(byte*~) gotoxy::$5 zp[2]:19 20002.0 +(word~) gotoxy::$6 zp[2]:19 20002.0 +(label) gotoxy::@1 +(label) gotoxy::@2 +(label) gotoxy::@3 +(label) gotoxy::@4 +(label) gotoxy::@return +(word) gotoxy::line_offset +(word) gotoxy::line_offset#0 line_offset zp[2]:19 20002.0 +(byte) gotoxy::x +(byte) gotoxy::x#2 reg byte x 1001.0 +(byte) gotoxy::x#3 reg byte x 1001.0 +(byte) gotoxy::x#4 reg byte x 3667.333333333333 +(byte) gotoxy::x#5 reg byte x 20002.0 +(byte) gotoxy::y +(byte) gotoxy::y#2 reg byte a 2002.0 +(byte) gotoxy::y#3 reg byte a 2002.0 +(byte) gotoxy::y#4 reg byte a 7334.666666666666 +(byte) gotoxy::y#5 reg byte a 3333.6666666666665 (void()) main() (label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@14 +(label) main::@15 +(label) main::@16 +(label) main::@17 +(label) main::@18 (label) main::@2 (label) main::@3 (label) main::@4 (label) main::@5 (label) main::@6 (label) main::@7 +(label) main::@8 +(label) main::@9 (label) main::enableVideoOutput1 +(byte) main::i +(byte) main::i#1 i zp[1]:4 202.0 +(byte) main::i#2 i zp[1]:4 86.57142857142857 (label) main::initNES1 (label) main::initNES1_@1 (label) main::initNES1_@7 @@ -5362,84 +8181,122 @@ FINAL SYMBOL TABLE (label) main::initNES1_waitForVBlank2 (byte~) main::initNES1_waitForVBlank2_$0 reg byte a 202.0 (label) main::initNES1_waitForVBlank2_@1 -(const byte*) main::s[(byte) $25] = (byte*) "hello world! -i am nes - look at me - -" +(label) main::screensizex1 +(byte) main::screensizex1_return +(const byte) main::screensizex1_return#0 screensizex1_return = (byte) $20 +(label) main::screensizex2 +(byte) main::screensizex2_return +(const byte) main::screensizex2_return#0 screensizex2_return = (byte) $20 +(label) main::screensizey1 +(byte) main::screensizey1_return +(const byte) main::screensizey1_return#0 screensizey1_return = (byte) $1e +(label) main::screensizey2 +(byte) main::screensizey2_return +(const byte) main::screensizey2_return#0 screensizey2_return = (byte) $1e +(label) main::screensizey3 +(byte) main::screensizey3_return +(const byte) main::screensizey3_return#0 screensizey3_return = (byte) $1e +(byte) main::x +(byte) main::x#1 x zp[1]:2 202.0 +(byte) main::x#10 x zp[1]:2 72.14285714285714 +(byte) main::y +(byte) main::y#1 y zp[1]:3 202.0 +(byte) main::y#10 y zp[1]:3 72.14285714285714 +(const byte*) num_buffer[(number) $b] = { fill( $b, 0) } +(void()) ppuDataFetch((nomodify void*) ppuDataFetch::cpuData , (nomodify void*) ppuDataFetch::ppuData , (word) ppuDataFetch::size) +(label) ppuDataFetch::@1 +(label) ppuDataFetch::@2 +(label) ppuDataFetch::@3 +(label) ppuDataFetch::@return +(nomodify void*) ppuDataFetch::cpuData +(const nomodify void*) ppuDataFetch::cpuData#0 cpuData = (void*)(const byte*) scroll_buffer +(byte*) ppuDataFetch::cpuDst +(byte*) ppuDataFetch::cpuDst#1 cpuDst zp[2]:7 1.0E17 +(byte*) ppuDataFetch::cpuDst#2 cpuDst zp[2]:7 7.5E16 +(word) ppuDataFetch::i +(word) ppuDataFetch::i#1 i zp[2]:5 2.0E17 +(word) ppuDataFetch::i#2 i zp[2]:5 6.0E16 +(nomodify void*) ppuDataFetch::ppuData +(nomodify void*) ppuDataFetch::ppuData#0 ppuData zp[2]:25 5.25000000000075E12 +(label) ppuDataFetch::ppuDataPrepare1 +(byte~) ppuDataFetch::ppuDataPrepare1_$0 reg byte a 2.0000000000002E13 +(byte~) ppuDataFetch::ppuDataPrepare1_$1 reg byte a 2.0000000000002E13 +(nomodify void*) ppuDataFetch::ppuDataPrepare1_ppuData +(label) ppuDataFetch::ppuDataRead1 +(byte) ppuDataFetch::ppuDataRead1_return +(byte) ppuDataFetch::ppuDataRead1_return#0 reg byte a 2.0E17 +(word) ppuDataFetch::size +(const word) ppuDataFetch::size#0 size = (byte) $20 (void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) (label) ppuDataFill::@1 (label) ppuDataFill::@2 (label) ppuDataFill::@return (word) ppuDataFill::i -(word) ppuDataFill::i#1 i zp[2]:9 2.00000002E8 -(word) ppuDataFill::i#2 i zp[2]:9 1.00000001E8 +(word) ppuDataFill::i#1 i zp[2]:25 2.000000000002E12 +(word) ppuDataFill::i#2 i zp[2]:25 1.000000000001E12 (nomodify void*) ppuDataFill::ppuData (label) ppuDataFill::ppuDataPrepare1 -(byte~) ppuDataFill::ppuDataPrepare1_$0 reg byte a 2.0000002E7 -(byte~) ppuDataFill::ppuDataPrepare1_$1 reg byte a 2.0000002E7 +(byte~) ppuDataFill::ppuDataPrepare1_$0 reg byte a 2.0000000002E10 +(byte~) ppuDataFill::ppuDataPrepare1_$1 reg byte a 2.0000000002E10 (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData -(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataPrepare1_ppuData zp[2]:5 6666667.333333333 +(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataPrepare1_ppuData zp[2]:9 6.666666667333333E9 (label) ppuDataFill::ppuDataPut1 (byte) ppuDataFill::ppuDataPut1_val (word) ppuDataFill::size -(word) ppuDataFill::size#5 size zp[2]:17 1.1111111222222222E7 +(word) ppuDataFill::size#5 size zp[2]:11 1.1111111111122223E11 (byte) ppuDataFill::val -(byte) ppuDataFill::val#10 reg byte x 1.1111111222222222E7 -(byte()) ppuDataGet((nomodify void*) ppuDataGet::ppuData) -(label) ppuDataGet::@return -(nomodify void*) ppuDataGet::ppuData -(nomodify void*) ppuDataGet::ppuData#0 ppuData zp[2]:17 5.25000000075E9 -(label) ppuDataGet::ppuDataPrepare1 -(byte~) ppuDataGet::ppuDataPrepare1_$0 reg byte a 2.0000000002E10 -(byte~) ppuDataGet::ppuDataPrepare1_$1 reg byte a 2.0000000002E10 -(nomodify void*) ppuDataGet::ppuDataPrepare1_ppuData -(label) ppuDataGet::ppuDataRead1 -(byte) ppuDataGet::ppuDataRead1_return -(byte) ppuDataGet::ppuDataRead1_return#0 reg byte a 3.666666667333333E9 -(byte) ppuDataGet::return -(byte) ppuDataGet::return#2 reg byte a 2.000000002E9 +(byte) ppuDataFill::val#10 reg byte x 1.1111111111122223E11 (void()) ppuDataSet((nomodify void*) ppuDataSet::ppuData , (byte) ppuDataSet::val) (label) ppuDataSet::@return (nomodify void*) ppuDataSet::ppuData -(nomodify byte*) ppuDataSet::ppuData#0 ppuData zp[2]:5 5000.5 -(nomodify void*) ppuDataSet::ppuData#1 ppuData zp[2]:5 1.000000001E9 +(nomodify byte*) ppuDataSet::ppuData#0 ppuData zp[2]:23 2000000.2 (label) ppuDataSet::ppuDataPrepare1 -(byte~) ppuDataSet::ppuDataPrepare1_$0 reg byte a 2.0000000002E10 -(byte~) ppuDataSet::ppuDataPrepare1_$1 reg byte a 2.0000000002E10 +(byte~) ppuDataSet::ppuDataPrepare1_$0 reg byte x 2.00000002E8 +(byte~) ppuDataSet::ppuDataPrepare1_$1 reg byte x 2.00000002E8 (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData -(nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 ppuDataPrepare1_ppuData zp[2]:5 7.000003334666666E9 -(nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#2 ppuDataPrepare1_ppuData zp[2]:5 20002.0 (label) ppuDataSet::ppuDataPut1 (byte) ppuDataSet::ppuDataPut1_val (byte) ppuDataSet::val -(byte) ppuDataSet::val#0 reg byte x 10001.0 -(byte) ppuDataSet::val#1 reg byte x 2.000000002E9 -(byte) ppuDataSet::val#2 reg byte x 2.2000020006E9 +(byte) ppuDataSet::val#0 reg byte a 1.8333333666666668E7 (void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size) (label) ppuDataTransfer::@1 (label) ppuDataTransfer::@2 (label) ppuDataTransfer::@3 +(label) ppuDataTransfer::@4 (label) ppuDataTransfer::@return (nomodify void*) ppuDataTransfer::cpuData -(const nomodify void*) ppuDataTransfer::cpuData#0 cpuData = (void*)(const byte*) PALETTE +(nomodify void*) ppuDataTransfer::cpuData#2 cpuData zp[2]:7 (byte*) ppuDataTransfer::cpuSrc -(byte*) ppuDataTransfer::cpuSrc#1 cpuSrc zp[2]:9 1001.0 -(byte*) ppuDataTransfer::cpuSrc#2 cpuSrc zp[2]:9 750.75 +(byte*) ppuDataTransfer::cpuSrc#1 cpuSrc zp[2]:7 1.000000000000001E15 +(byte*) ppuDataTransfer::cpuSrc#2 cpuSrc zp[2]:7 7.52500000000001E14 +(byte*) ppuDataTransfer::cpuSrc#6 cpuSrc zp[2]:7 2.0000000000002E13 (word) ppuDataTransfer::i -(word) ppuDataTransfer::i#1 i zp[2]:7 2002.0 -(word) ppuDataTransfer::i#2 i zp[2]:7 600.5999999999999 +(word) ppuDataTransfer::i#1 i zp[2]:11 2.000000000000002E15 +(word) ppuDataTransfer::i#2 i zp[2]:11 6.000000000000005E14 (nomodify void*) ppuDataTransfer::ppuData -(const nomodify void*) ppuDataTransfer::ppuData#0 ppuData = (void*)(const nomodify byte*) PPU_PALETTE +(nomodify void*) ppuDataTransfer::ppuData#0 ppuData zp[2]:5 2.000000000002E12 (label) ppuDataTransfer::ppuDataPrepare1 +(byte~) ppuDataTransfer::ppuDataPrepare1_$0 reg byte a 2.0000000000002E13 +(byte~) ppuDataTransfer::ppuDataPrepare1_$1 reg byte a 2.0000000000002E13 (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData +(nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 ppuDataPrepare1_ppuData zp[2]:5 7.000000000001E12 (label) ppuDataTransfer::ppuDataPut1 (byte) ppuDataTransfer::ppuDataPut1_val -(byte) ppuDataTransfer::ppuDataPut1_val#0 reg byte a 2002.0 +(byte) ppuDataTransfer::ppuDataPut1_val#0 reg byte a 2.000000000000002E15 (word) ppuDataTransfer::size -(const word) ppuDataTransfer::size#0 size = (byte) $20*(const byte) SIZEOF_BYTE +(word) ppuDataTransfer::size#3 size zp[2]:9 8.333333333333342E13 +(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) } +(byte) printf_buffer_number::sign +(byte) printf_format_number::justify_left +(byte) printf_format_number::min_length +(byte) printf_format_number::radix +(byte) printf_format_number::sign_always +(byte) printf_format_number::upper_case +(byte) printf_format_number::zero_padding +(byte) printf_format_string::justify_left +(byte) printf_format_string::min_length (byte()) readJoy1() -(byte~) readJoy1::$1 zp[1]:19 101.0 +(byte~) readJoy1::$1 zp[1]:28 101.0 (byte~) readJoy1::$2 reg byte a 202.0 (label) readJoy1::@1 (label) readJoy1::@2 @@ -5452,6 +8309,56 @@ i am nes (byte) readJoy1::joy#2 reg byte a 51.0 (byte) readJoy1::return (byte) readJoy1::return#2 reg byte a 4.0 +(const byte*) scroll_buffer[(number) $20] = { fill( $20, 0) } +(void()) uctoa((byte) uctoa::value , (byte*) uctoa::buffer , (byte) uctoa::radix) +(label) uctoa::@1 +(label) uctoa::@2 +(label) uctoa::@3 +(label) uctoa::@4 +(label) uctoa::@5 +(label) uctoa::@6 +(label) uctoa::@7 +(label) uctoa::@return +(byte*) uctoa::buffer +(byte*) uctoa::buffer#11 buffer zp[2]:15 33500.49999999999 +(byte*) uctoa::buffer#14 buffer zp[2]:15 150001.5 +(byte*) uctoa::buffer#3 buffer zp[2]:15 2002.0 +(byte*) uctoa::buffer#4 buffer zp[2]:15 200002.0 +(byte) uctoa::digit +(byte) uctoa::digit#1 digit zp[1]:17 200002.0 +(byte) uctoa::digit#2 digit zp[1]:17 30769.53846153846 +(byte) uctoa::digit_value +(byte) uctoa::digit_value#0 digit_value zp[1]:27 60000.600000000006 +(byte*) uctoa::digit_values +(byte) uctoa::max_digits +(const byte) uctoa::max_digits#2 max_digits = (byte) 2 +(byte) uctoa::radix +(byte) uctoa::started +(byte) uctoa::started#2 started zp[1]:18 60000.600000000006 +(byte) uctoa::started#4 started zp[1]:18 100001.0 +(byte) uctoa::value +(byte) uctoa::value#0 reg byte x 100001.0 +(byte) uctoa::value#1 reg byte x 551.0 +(byte) uctoa::value#2 reg byte x 67000.99999999999 +(byte) uctoa::value#6 reg byte x 150001.5 +(byte()) uctoa_append((byte*) uctoa_append::buffer , (byte) uctoa_append::value , (byte) uctoa_append::sub) +(label) uctoa_append::@1 +(label) uctoa_append::@2 +(label) uctoa_append::@3 +(label) uctoa_append::@return +(byte*) uctoa_append::buffer +(byte*) uctoa_append::buffer#0 buffer zp[2]:15 137500.25 +(byte) uctoa_append::digit +(byte) uctoa_append::digit#1 reg byte y 1.000000001E9 +(byte) uctoa_append::digit#2 reg byte y 1.0005000015E9 +(byte) uctoa_append::return +(byte) uctoa_append::return#0 reg byte x 200002.0 +(byte) uctoa_append::sub +(byte) uctoa_append::sub#0 sub zp[1]:27 3.333500005E8 +(byte) uctoa_append::value +(byte) uctoa_append::value#0 reg byte x 366667.3333333334 +(byte) uctoa_append::value#1 reg byte x 2.000000002E9 +(byte) uctoa_append::value#2 reg byte x 5.0018333416666675E8 interrupt(HARDWARE_STACK)(void()) vblank() (byte~) vblank::$1 reg byte a 4.0 (byte~) vblank::$3 reg byte a 4.0 @@ -5471,52 +8378,69 @@ interrupt(HARDWARE_STACK)(void()) vblank() (label) vblank::@return (byte) vblank::joy (byte) vblank::joy#0 reg byte x 0.7142857142857142 -(volatile byte) x_scroll loadstore zp[1]:15 1.1500000000000001 -(volatile byte) y_scroll loadstore zp[1]:16 1.4761904761904767 +(volatile byte) x_scroll loadstore zp[1]:21 1.1500000000000001 +(volatile byte) y_scroll loadstore zp[1]:22 1.4761904761904767 reg byte x [ main::initNES1_i#2 main::initNES1_i#1 ] -zp[1]:2 [ cscroll::y#2 cscroll::y#1 ] -zp[2]:3 [ cscroll::line1#6 cscroll::line1#2 cscroll::line1#1 ] -reg byte y [ cscroll::x#2 cscroll::x#1 ] -reg byte x [ ppuDataSet::val#2 ppuDataSet::val#0 ppuDataSet::val#1 ] -zp[2]:5 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataSet::ppuDataPrepare1_ppuData#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ppuDataSet::ppuData#1 ppuDataSet::ppuData#0 ] +zp[1]:2 [ main::x#10 main::x#1 ] +zp[1]:3 [ main::y#10 main::y#1 ] +zp[1]:4 [ main::i#2 main::i#1 ] +reg byte x [ cputcxy::x#4 cputcxy::x#0 cputcxy::x#1 ] +reg byte a [ cputcxy::y#4 cputcxy::y#3 cputcxy::y#2 ] +reg byte y [ cputcxy::c#4 ] +reg byte x [ cputc::c#2 cputc::c#1 cputc::c#0 ] +reg byte x [ cscroll::y#2 cscroll::y#1 ] +zp[2]:5 [ ppuDataFetch::i#2 ppuDataFetch::i#1 ppuDataTransfer::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuData#0 ] +zp[2]:7 [ ppuDataFetch::cpuDst#2 ppuDataFetch::cpuDst#1 ppuDataTransfer::cpuData#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] +zp[2]:9 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataTransfer::size#3 ] +zp[2]:11 [ ppuDataFill::size#5 ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] reg byte x [ ppuDataFill::val#10 ] -zp[2]:7 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 cputs::s#2 cputs::s#0 ] -zp[2]:9 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#1 cscroll::line2#6 cscroll::line2#2 cscroll::line2#1 ppuDataFill::i#2 ppuDataFill::i#1 ] +reg byte a [ gotoxy::y#5 gotoxy::y#4 gotoxy::y#2 gotoxy::y#3 ] +reg byte x [ gotoxy::x#5 gotoxy::x#4 gotoxy::x#2 gotoxy::x#3 ] +zp[2]:13 [ cputs::s#2 cputs::s#0 ] +reg byte x [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ] +zp[2]:15 [ uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 cscroll::line2#2 cscroll::line2#1 ] +reg byte x [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ] +reg byte y [ uctoa_append::digit#2 uctoa_append::digit#1 ] reg byte x [ readJoy1::i#2 readJoy1::i#1 ] reg byte a [ readJoy1::joy#2 readJoy1::joy#1 ] -zp[1]:11 [ conio_cursor_x ] -zp[1]:12 [ conio_cursor_y ] -zp[2]:13 [ conio_line_text ] -zp[1]:15 [ x_scroll ] -zp[1]:16 [ y_scroll ] +zp[1]:17 [ conio_cursor_x uctoa::digit#2 uctoa::digit#1 ] +zp[1]:18 [ conio_cursor_y uctoa::started#2 uctoa::started#4 ] +zp[2]:19 [ conio_line_text gotoxy::$5 gotoxy::$6 gotoxy::line_offset#0 ] +zp[1]:21 [ x_scroll ] +zp[1]:22 [ y_scroll ] reg byte a [ main::initNES1_waitForVBlank1_$0 ] reg byte a [ main::initNES1_waitForVBlank2_$0 ] -reg byte a [ cputs::c#1 ] -reg byte x [ cputc::c#0 ] -zp[2]:17 [ ppuDataGet::ppuData#0 ppuDataFill::size#5 ] -reg byte a [ ppuDataGet::return#2 ] -reg byte x [ cscroll::ch#0 ] -reg byte a [ ppuDataSet::ppuDataPrepare1_$0 ] -reg byte a [ ppuDataSet::ppuDataPrepare1_$1 ] -reg byte a [ ppuDataGet::ppuDataPrepare1_$0 ] -reg byte a [ ppuDataGet::ppuDataPrepare1_$1 ] -reg byte a [ ppuDataGet::ppuDataRead1_return#0 ] +reg byte x [ cputsxy::x#0 ] +reg byte a [ cputsxy::y#0 ] +zp[2]:23 [ ppuDataSet::ppuData#0 cscroll::line1#2 cscroll::line1#1 ] +reg byte a [ ppuDataSet::val#0 ] +zp[2]:25 [ ppuDataFetch::ppuData#0 ppuDataFill::i#2 ppuDataFill::i#1 ] +reg byte a [ ppuDataTransfer::ppuDataPrepare1_$0 ] +reg byte a [ ppuDataTransfer::ppuDataPrepare1_$1 ] +reg byte a [ ppuDataTransfer::ppuDataPut1_val#0 ] +reg byte a [ ppuDataFetch::ppuDataPrepare1_$0 ] +reg byte a [ ppuDataFetch::ppuDataPrepare1_$1 ] +reg byte a [ ppuDataFetch::ppuDataRead1_return#0 ] reg byte a [ ppuDataFill::ppuDataPrepare1_$0 ] reg byte a [ ppuDataFill::ppuDataPrepare1_$1 ] -reg byte a [ ppuDataTransfer::ppuDataPut1_val#0 ] +reg byte x [ ppuDataSet::ppuDataPrepare1_$0 ] +reg byte x [ ppuDataSet::ppuDataPrepare1_$1 ] +reg byte a [ cputs::c#1 ] +zp[1]:27 [ uctoa::digit_value#0 uctoa_append::sub#0 ] +reg byte x [ uctoa_append::return#0 ] reg byte a [ readJoy1::return#2 ] reg byte x [ vblank::joy#0 ] reg byte a [ vblank::$1 ] reg byte a [ vblank::$3 ] reg byte a [ vblank::$5 ] reg byte a [ vblank::$7 ] -zp[1]:19 [ readJoy1::$1 ] +zp[1]:28 [ readJoy1::$1 ] reg byte a [ readJoy1::$2 ] FINAL ASSEMBLER -Score: 69985 +Score: 893079 // File Comments // NES conio printing @@ -5585,6 +8509,10 @@ Score: 69985 // $3000-$3eff $0f00 Mirrors of $2000-$2eff // $3f00-$3f1f $0020 Palette RAM indexes .label PPU_PALETTE = $3f00 + // PPU Status Register for reading in ASM + .label PPU_PPUSTATUS = $2002 + // PPU Data Register for reading in ASM + .label PPU_PPUDATA = $2007 // APU Frame Counter // generates low-frequency clocks for the channels and an optional 60 Hz interrupt. // https://wiki.nesdev.com/w/index.php/APU_Frame_Counter @@ -5599,17 +8527,15 @@ Score: 69985 .label FR_COUNTER = $4017 // Pointer to the start of RAM memory .label MEMORY = 0 - // PPU Status Register for reading in ASM - .label PPU_PPUSTATUS = $2002 // NES Picture Processing Unit (PPU) .label PPU = $2000 // NES CPU and audion processing unit (APU) .label APU = $4000 - .label conio_cursor_x = $b - .label conio_cursor_y = $c - .label conio_line_text = $d - .label x_scroll = $f - .label y_scroll = $10 + .label conio_cursor_x = $11 + .label conio_cursor_y = $12 + .label conio_line_text = $13 + .label x_scroll = $15 + .label y_scroll = $16 // @begin __bbegin: // @1 @@ -5649,6 +8575,14 @@ __bbegin: // main // RESET Called when the NES is reset, including when it is turned on. main: { + .const screensizex1_return = $20 + .const screensizey1_return = $1e + .const screensizey2_return = $1e + .const screensizex2_return = $20 + .const screensizey3_return = $1e + .label x = 2 + .label y = 3 + .label i = 4 // main::initNES1 // asm // asm { cld ldx#$ff txs } @@ -5741,131 +8675,251 @@ main: { // asm // asm { ldaPPU_PPUSTATUS } lda PPU_PPUSTATUS - // [34] phi from main::initNES1_@7 to main::@2 [phi:main::initNES1_@7->main::@2] - // main::@2 + // [34] phi from main::initNES1_@7 to main::@6 [phi:main::initNES1_@7->main::@6] + // main::@6 // ppuDataTransfer(PPU_PALETTE, PALETTE, sizeof(PALETTE)) // [35] call ppuDataTransfer // Transfer the palette - // [125] phi from main::@2 to ppuDataTransfer [phi:main::@2->ppuDataTransfer] + // [110] phi from main::@6 to ppuDataTransfer [phi:main::@6->ppuDataTransfer] + // [110] phi (word) ppuDataTransfer::size#3 = (byte) $20*(const byte) SIZEOF_BYTE [phi:main::@6->ppuDataTransfer#0] -- vwuz1=vbuc1 + lda #<$20*SIZEOF_BYTE + sta.z ppuDataTransfer.size + lda #>$20*SIZEOF_BYTE + sta.z ppuDataTransfer.size+1 + // [110] phi (nomodify void*) ppuDataTransfer::cpuData#2 = (void*)(const byte*) PALETTE [phi:main::@6->ppuDataTransfer#1] -- pvoz1=pvoc1 + lda #PALETTE + sta.z ppuDataTransfer.cpuData+1 + // [110] phi (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_PALETTE [phi:main::@6->ppuDataTransfer#2] -- pvoz1=pvoc1 + lda #PPU_PALETTE + sta.z ppuDataTransfer.ppuDataPrepare1_ppuData+1 jsr ppuDataTransfer - // [36] phi from main::@2 to main::@3 [phi:main::@2->main::@3] - // main::@3 + // [36] phi from main::@6 to main::@12 [phi:main::@6->main::@12] + // main::@12 // ppuDataFill(PPU_ATTRIBUTE_TABLE_0, 0, 0x40) // [37] call ppuDataFill // Fill the PPU attribute table - // [109] phi from main::@3 to ppuDataFill [phi:main::@3->ppuDataFill] - // [109] phi (byte) ppuDataFill::val#10 = (byte) 0 [phi:main::@3->ppuDataFill#0] -- vbuxx=vbuc1 + // [136] phi from main::@12 to ppuDataFill [phi:main::@12->ppuDataFill] + // [136] phi (byte) ppuDataFill::val#10 = (byte) 0 [phi:main::@12->ppuDataFill#0] -- vbuxx=vbuc1 ldx #0 - // [109] phi (word) ppuDataFill::size#5 = (byte) $40 [phi:main::@3->ppuDataFill#1] -- vwuz1=vbuc1 + // [136] phi (word) ppuDataFill::size#5 = (byte) $40 [phi:main::@12->ppuDataFill#1] -- vwuz1=vbuc1 lda #<$40 sta.z ppuDataFill.size lda #>$40 sta.z ppuDataFill.size+1 - // [109] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 [phi:main::@3->ppuDataFill#2] -- pvoz1=pvoc1 + // [136] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 [phi:main::@12->ppuDataFill#2] -- pvoz1=pvoc1 lda #PPU_ATTRIBUTE_TABLE_0 sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 jsr ppuDataFill - // [38] phi from main::@3 to main::@4 [phi:main::@3->main::@4] - // main::@4 + // [38] phi from main::@12 to main::@13 [phi:main::@12->main::@13] + // main::@13 // ppuDataFill(PPU_ATTRIBUTE_TABLE_1, 0, 0x40) // [39] call ppuDataFill - // [109] phi from main::@4 to ppuDataFill [phi:main::@4->ppuDataFill] - // [109] phi (byte) ppuDataFill::val#10 = (byte) 0 [phi:main::@4->ppuDataFill#0] -- vbuxx=vbuc1 + // [136] phi from main::@13 to ppuDataFill [phi:main::@13->ppuDataFill] + // [136] phi (byte) ppuDataFill::val#10 = (byte) 0 [phi:main::@13->ppuDataFill#0] -- vbuxx=vbuc1 ldx #0 - // [109] phi (word) ppuDataFill::size#5 = (byte) $40 [phi:main::@4->ppuDataFill#1] -- vwuz1=vbuc1 + // [136] phi (word) ppuDataFill::size#5 = (byte) $40 [phi:main::@13->ppuDataFill#1] -- vwuz1=vbuc1 lda #<$40 sta.z ppuDataFill.size lda #>$40 sta.z ppuDataFill.size+1 - // [109] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_1 [phi:main::@4->ppuDataFill#2] -- pvoz1=pvoc1 + // [136] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_ATTRIBUTE_TABLE_1 [phi:main::@13->ppuDataFill#2] -- pvoz1=pvoc1 lda #PPU_ATTRIBUTE_TABLE_1 sta.z ppuDataFill.ppuDataPrepare1_ppuData+1 jsr ppuDataFill - // [40] phi from main::@4 to main::@5 [phi:main::@4->main::@5] - // main::@5 + // [40] phi from main::@13 to main::@14 [phi:main::@13->main::@14] + // main::@14 // clrscr() // [41] call clrscr // Print a string - // [119] phi from main::@5 to clrscr [phi:main::@5->clrscr] + // [207] phi from main::@14 to clrscr [phi:main::@14->clrscr] jsr clrscr - // [42] phi from main::@5 to main::@6 [phi:main::@5->main::@6] - // main::@6 - // cputs("hello world!\ni am nes\n look at me \n\n") - // [43] call cputs - // [49] phi from main::@6 to cputs [phi:main::@6->cputs] - jsr cputs + // [42] phi from main::@14 to main::screensizex1 [phi:main::@14->main::screensizex1] + // [42] phi (byte) main::x#10 = (byte) 1 [phi:main::@14->main::screensizex1#0] -- vbuz1=vbuc1 + lda #1 + sta.z x + // main::screensizex1 // main::@7 + __b7: + // for(char x=1;xmain::screensizey2] + // [44] phi (byte) main::y#10 = (byte) 1 [phi:main::@7->main::screensizey2#0] -- vbuz1=vbuc1 + lda #1 + sta.z y + // main::screensizey2 + // main::@9 + __b9: + // for(char y=1;ymain::screensizey3] + // [46] phi (byte) main::i#2 = (byte) 0 [phi:main::@9->main::screensizey3#0] -- vbuz1=vbuc1 + lda #0 + sta.z i + // main::screensizey3 + // main::@11 + __b11: + // for(char i=0;iPPUCTRL = 0b10000000 - // [46] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 -- _deref_pbuc1=vbuc2 + // [50] *((byte*)(const struct RICOH_2C02*) PPU) ← (byte) $80 -- _deref_pbuc1=vbuc2 lda #$80 sta PPU // PPU->PPUMASK = 0b00011110 - // [47] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e -- _deref_pbuc1=vbuc2 + // [51] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUMASK) ← (byte) $1e -- _deref_pbuc1=vbuc2 lda #$1e sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUMASK - // [48] phi from main::@1 main::enableVideoOutput1 to main::@1 [phi:main::@1/main::enableVideoOutput1->main::@1] - __b1: + // [52] phi from main::@5 main::enableVideoOutput1 to main::@5 [phi:main::@5/main::enableVideoOutput1->main::@5] + __b4: // Infinite loop - // main::@1 - jmp __b1 - .segment Data - s: .text @"hello world!\ni am nes\n look at me \n\n" - .byte 0 -} -.segment Code - // cputs -// Output a NUL-terminated string at the current cursor position -// cputs(byte* zp(7) s) -cputs: { - .label s = 7 - // [50] phi from cputs to cputs::@1 [phi:cputs->cputs::@1] - // [50] phi (to_nomodify byte*) cputs::s#2 = (const byte*) main::s [phi:cputs->cputs::@1#0] -- pbuz1=pbuc1 - lda #main.s - sta.z s+1 - // cputs::@1 - __b1: - // c=*s++ - // [51] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#2) -- vbuaa=_deref_pbuz1 - ldy #0 - lda (s),y - // while(c=*s++) - // [52] (to_nomodify byte*) cputs::s#0 ← ++ (to_nomodify byte*) cputs::s#2 -- pbuz1=_inc_pbuz1 - inc.z s - bne !+ - inc.z s+1 - !: - // [53] if((byte) 0!=(byte) cputs::c#1) goto cputs::@2 -- vbuc1_neq_vbuaa_then_la1 - cmp #0 - bne __b2 - // cputs::@return - // } - // [54] return - rts - // cputs::@2 - __b2: - // cputc(c) - // [55] (byte) cputc::c#0 ← (byte) cputs::c#1 -- vbuxx=vbuaa + // main::@5 + jmp __b4 + // main::@3 + __b3: + // uctoa(i&0xf, num_buffer, HEXADECIMAL) + // [53] (byte) uctoa::value#1 ← (byte) main::i#2 & (byte) $f -- vbuxx=vbuz1_band_vbuc1 + lda #$f + and.z i tax - // [56] call cputc + // [54] call uctoa + // [181] phi from main::@3 to uctoa [phi:main::@3->uctoa] + jsr uctoa + // main::@17 + // cputsxy(i, i, num_buffer) + // [55] (byte) cputsxy::x#0 ← (byte) main::i#2 -- vbuxx=vbuz1 + ldx.z i + // [56] (byte) cputsxy::y#0 ← (byte) main::i#2 -- vbuaa=vbuz1 + txa + // [57] call cputsxy + jsr cputsxy + // main::@18 + // for(char i=0;imain::screensizey3] + // [46] phi (byte) main::i#2 = (byte) main::i#1 [phi:main::@18->main::screensizey3#0] -- register_copy + jmp __b11 + // main::@2 + __b2: + // cputcxy(1, y, 'i') + // [59] (byte) cputcxy::y#2 ← (byte) main::y#10 -- vbuaa=vbuz1 + lda.z y + // [60] call cputcxy + // [71] phi from main::@2 to cputcxy [phi:main::@2->cputcxy] + // [71] phi (byte) cputcxy::c#4 = (byte) 'i' [phi:main::@2->cputcxy#0] -- vbuyy=vbuc1 + ldy #'i' + // [71] phi (byte) cputcxy::y#4 = (byte) cputcxy::y#2 [phi:main::@2->cputcxy#1] -- register_copy + // [71] phi (byte) cputcxy::x#4 = (byte) 1 [phi:main::@2->cputcxy#2] -- vbuxx=vbuc1 + ldx #1 + jsr cputcxy + // [61] phi from main::@2 to main::screensizex2 [phi:main::@2->main::screensizex2] + // main::screensizex2 + // main::@10 + // cputcxy(screensizex()-2, y, 'i') + // [62] (byte) cputcxy::y#3 ← (byte) main::y#10 -- vbuaa=vbuz1 + lda.z y + // [63] call cputcxy + // [71] phi from main::@10 to cputcxy [phi:main::@10->cputcxy] + // [71] phi (byte) cputcxy::c#4 = (byte) 'i' [phi:main::@10->cputcxy#0] -- vbuyy=vbuc1 + ldy #'i' + // [71] phi (byte) cputcxy::y#4 = (byte) cputcxy::y#3 [phi:main::@10->cputcxy#1] -- register_copy + // [71] phi (byte) cputcxy::x#4 = (const byte) main::screensizex2_return#0-(byte) 2 [phi:main::@10->cputcxy#2] -- vbuxx=vbuc1 + ldx #screensizex2_return-2 + jsr cputcxy + // main::@16 + // for(char y=1;ymain::screensizey2] + // [44] phi (byte) main::y#10 = (byte) main::y#1 [phi:main::@16->main::screensizey2#0] -- register_copy + jmp __b9 + // main::@1 + __b1: + // cputcxy(x, 1, '-') + // [65] (byte) cputcxy::x#0 ← (byte) main::x#10 -- vbuxx=vbuz1 + ldx.z x + // [66] call cputcxy + // [71] phi from main::@1 to cputcxy [phi:main::@1->cputcxy] + // [71] phi (byte) cputcxy::c#4 = (byte) '-' [phi:main::@1->cputcxy#0] -- vbuyy=vbuc1 + ldy #'-' + // [71] phi (byte) cputcxy::y#4 = (byte) 1 [phi:main::@1->cputcxy#1] -- vbuaa=vbuc1 + lda #1 + // [71] phi (byte) cputcxy::x#4 = (byte) cputcxy::x#0 [phi:main::@1->cputcxy#2] -- register_copy + jsr cputcxy + // [67] phi from main::@1 to main::screensizey1 [phi:main::@1->main::screensizey1] + // main::screensizey1 + // main::@8 + // cputcxy(x, screensizey()-4, '-') + // [68] (byte) cputcxy::x#1 ← (byte) main::x#10 -- vbuxx=vbuz1 + ldx.z x + // [69] call cputcxy + // [71] phi from main::@8 to cputcxy [phi:main::@8->cputcxy] + // [71] phi (byte) cputcxy::c#4 = (byte) '-' [phi:main::@8->cputcxy#0] -- vbuyy=vbuc1 + ldy #'-' + // [71] phi (byte) cputcxy::y#4 = (const byte) main::screensizey1_return#0-(byte) 4 [phi:main::@8->cputcxy#1] -- vbuaa=vbuc1 + lda #screensizey1_return-4 + // [71] phi (byte) cputcxy::x#4 = (byte) cputcxy::x#1 [phi:main::@8->cputcxy#2] -- register_copy + jsr cputcxy + // main::@15 + // for(char x=1;xmain::screensizex1] + // [42] phi (byte) main::x#10 = (byte) main::x#1 [phi:main::@15->main::screensizex1#0] -- register_copy + jmp __b7 +} + // cputcxy +// Move cursor and output one character +// Same as "gotoxy (x, y); cputc (c);" +// cputcxy(byte register(X) x, byte register(A) y, byte register(Y) c) +cputcxy: { + // gotoxy(x, y) + // [72] (byte) gotoxy::x#2 ← (byte) cputcxy::x#4 + // [73] (byte) gotoxy::y#2 ← (byte) cputcxy::y#4 + // [74] call gotoxy + // [153] phi from cputcxy to gotoxy [phi:cputcxy->gotoxy] + // [153] phi (byte) gotoxy::x#4 = (byte) gotoxy::x#2 [phi:cputcxy->gotoxy#0] -- register_copy + // [153] phi (byte) gotoxy::y#4 = (byte) gotoxy::y#2 [phi:cputcxy->gotoxy#1] -- register_copy + jsr gotoxy + // cputcxy::@1 + // cputc(c) + // [75] (byte) cputc::c#1 ← (byte) cputcxy::c#4 -- vbuxx=vbuyy + tya + tax + // [76] call cputc + // [78] phi from cputcxy::@1 to cputc [phi:cputcxy::@1->cputc] + // [78] phi (byte) cputc::c#2 = (byte) cputc::c#1 [phi:cputcxy::@1->cputc#0] -- register_copy jsr cputc - // [50] phi from cputs::@2 to cputs::@1 [phi:cputs::@2->cputs::@1] - // [50] phi (to_nomodify byte*) cputs::s#2 = (to_nomodify byte*) cputs::s#0 [phi:cputs::@2->cputs::@1#0] -- register_copy - jmp __b1 + // cputcxy::@return + // } + // [77] return + rts } // cputc // Output one character at the current cursor position @@ -5873,12 +8927,12 @@ cputs: { // cputc(byte register(X) c) cputc: { // if(c=='\n') - // [57] if((byte) cputc::c#0==(byte) ' ') goto cputc::@1 -- vbuxx_eq_vbuc1_then_la1 + // [79] if((byte) cputc::c#2==(byte) ' ') goto cputc::@1 -- vbuxx_eq_vbuc1_then_la1 cpx #'\n' beq __b1 // cputc::@2 // conio_line_text+conio_cursor_x - // [58] (nomodify byte*) ppuDataSet::ppuData#0 ← (byte*) conio_line_text + (byte) conio_cursor_x -- pbuz1=pbuz2_plus_vbuz3 + // [80] (nomodify byte*) ppuDataSet::ppuData#0 ← (byte*) conio_line_text + (byte) conio_cursor_x -- pbuz1=pbuz2_plus_vbuz3 lda.z conio_cursor_x clc adc.z conio_line_text @@ -5887,37 +8941,34 @@ cputc: { adc.z conio_line_text+1 sta.z ppuDataSet.ppuData+1 // ppuDataSet(conio_line_text+conio_cursor_x, c) - // [59] (byte) ppuDataSet::val#0 ← (byte) cputc::c#0 - // [60] (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#2 ← (void*)(nomodify byte*) ppuDataSet::ppuData#0 - // ppuDataSet(conio_line_text+conio_cursor_x, c) - // [61] call ppuDataSet - // [95] phi from cputc::@2 to ppuDataSet [phi:cputc::@2->ppuDataSet] - // [95] phi (byte) ppuDataSet::val#2 = (byte) ppuDataSet::val#0 [phi:cputc::@2->ppuDataSet#0] -- register_copy - // [95] phi (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 = (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#2 [phi:cputc::@2->ppuDataSet#1] -- register_copy + // [81] (byte) ppuDataSet::val#0 ← (byte) cputc::c#2 -- vbuaa=vbuxx + txa + // [82] call ppuDataSet + // [146] phi from cputc::@2 to ppuDataSet [phi:cputc::@2->ppuDataSet] jsr ppuDataSet // cputc::@4 // if(++conio_cursor_x==CONIO_WIDTH) - // [62] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x -- vbuz1=_inc_vbuz1 + // [83] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x -- vbuz1=_inc_vbuz1 inc.z conio_cursor_x - // [63] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return -- vbuz1_neq_vbuc1_then_la1 + // [84] if((byte) conio_cursor_x!=(byte) $20) goto cputc::@return -- vbuz1_neq_vbuc1_then_la1 lda #$20 cmp.z conio_cursor_x bne __breturn - // [64] phi from cputc::@4 to cputc::@3 [phi:cputc::@4->cputc::@3] + // [85] phi from cputc::@4 to cputc::@3 [phi:cputc::@4->cputc::@3] // cputc::@3 // cputln() - // [65] call cputln + // [86] call cputln jsr cputln // cputc::@return __breturn: // } - // [66] return + // [87] return rts - // [67] phi from cputc to cputc::@1 [phi:cputc->cputc::@1] + // [88] phi from cputc to cputc::@1 [phi:cputc->cputc::@1] // cputc::@1 __b1: // cputln() - // [68] call cputln + // [89] call cputln jsr cputln rts } @@ -5925,7 +8976,7 @@ cputc: { // Print a newline cputln: { // conio_line_text += CONIO_WIDTH - // [69] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $20 -- pbuz1=pbuz1_plus_vbuc1 + // [90] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $20 -- pbuz1=pbuz1_plus_vbuc1 lda #$20 clc adc.z conio_line_text @@ -5934,67 +8985,64 @@ cputln: { inc.z conio_line_text+1 !: // conio_cursor_x = 0 - // [70] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1 + // [91] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta.z conio_cursor_x // conio_cursor_y++; - // [71] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y -- vbuz1=_inc_vbuz1 + // [92] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y -- vbuz1=_inc_vbuz1 inc.z conio_cursor_y // cscroll() - // [72] call cscroll + // [93] call cscroll jsr cscroll // cputln::@return // } - // [73] return + // [94] return rts } // cscroll // Scroll the entire screen if the cursor is beyond the last line cscroll: { - .label line2 = 9 // Scroll lines up - .label line1 = 3 - .label y = 2 + .label line1 = $17 + .label line2 = $f // if(conio_cursor_y==CONIO_HEIGHT) - // [74] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return -- vbuz1_neq_vbuc1_then_la1 + // [95] if((byte) conio_cursor_y!=(byte) $1e) goto cscroll::@return -- vbuz1_neq_vbuc1_then_la1 lda #$1e cmp.z conio_cursor_y bne __breturn - // [75] phi from cscroll to cscroll::@1 [phi:cscroll->cscroll::@1] - // [75] phi (byte*) cscroll::line1#6 = (const nomodify byte*) PPU_NAME_TABLE_0 [phi:cscroll->cscroll::@1#0] -- pbuz1=pbuc1 + // [96] phi from cscroll to cscroll::@1 [phi:cscroll->cscroll::@1] + // [96] phi (byte*) cscroll::line1#2 = (const nomodify byte*) PPU_NAME_TABLE_0 [phi:cscroll->cscroll::@1#0] -- pbuz1=pbuc1 lda #PPU_NAME_TABLE_0 sta.z line1+1 - // [75] phi (byte*) cscroll::line2#6 = (const nomodify byte*) PPU_NAME_TABLE_0+(byte) $20 [phi:cscroll->cscroll::@1#1] -- pbuz1=pbuc1 + // [96] phi (byte*) cscroll::line2#2 = (const nomodify byte*) PPU_NAME_TABLE_0+(byte) $20 [phi:cscroll->cscroll::@1#1] -- pbuz1=pbuc1 lda #PPU_NAME_TABLE_0+$20 sta.z line2+1 - // [75] phi (byte) cscroll::y#2 = (byte) 0 [phi:cscroll->cscroll::@1#2] -- vbuz1=vbuc1 - lda #0 - sta.z y + // [96] phi (byte) cscroll::y#2 = (byte) 0 [phi:cscroll->cscroll::@1#2] -- vbuxx=vbuc1 + ldx #0 // cscroll::@1 __b1: // for(char y=0;ycscroll::@2] - // cscroll::@2 + // [98] phi from cscroll::@1 to cscroll::@3 [phi:cscroll::@1->cscroll::@3] + // cscroll::@3 // ppuDataFill(CONIO_SCREEN_TEXT+CONIO_BYTES-CONIO_WIDTH, ' ', CONIO_WIDTH) - // [78] call ppuDataFill + // [99] call ppuDataFill // Fill last line with space - // [109] phi from cscroll::@2 to ppuDataFill [phi:cscroll::@2->ppuDataFill] - // [109] phi (byte) ppuDataFill::val#10 = (byte) ' ' [phi:cscroll::@2->ppuDataFill#0] -- vbuxx=vbuc1 + // [136] phi from cscroll::@3 to ppuDataFill [phi:cscroll::@3->ppuDataFill] + // [136] phi (byte) ppuDataFill::val#10 = (byte) ' ' [phi:cscroll::@3->ppuDataFill#0] -- vbuxx=vbuc1 ldx #' ' - // [109] phi (word) ppuDataFill::size#5 = (byte) $20 [phi:cscroll::@2->ppuDataFill#1] -- vwuz1=vbuc1 + // [136] phi (word) ppuDataFill::size#5 = (byte) $20 [phi:cscroll::@3->ppuDataFill#1] -- vwuz1=vbuc1 lda #<$20 sta.z ppuDataFill.size lda #>$20 sta.z ppuDataFill.size+1 - // [109] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0+(word)(number) $1e*(number) $20-(byte) $20 [phi:cscroll::@2->ppuDataFill#2] -- pvoz1=pvoc1 + // [136] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0+(word)(number) $1e*(number) $20-(byte) $20 [phi:cscroll::@3->ppuDataFill#2] -- pvoz1=pvoc1 lda #PPU_NAME_TABLE_0+$1e*$20-$20 @@ -6002,7 +9050,7 @@ cscroll: { jsr ppuDataFill // cscroll::@6 // conio_line_text -= CONIO_WIDTH - // [79] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $20 -- pbuz1=pbuz1_minus_vbuc1 + // [100] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $20 -- pbuz1=pbuz1_minus_vbuc1 sec lda.z conio_line_text sbc #$20 @@ -6011,166 +9059,259 @@ cscroll: { sbc #0 sta.z conio_line_text+1 // conio_cursor_y--; - // [80] (byte) conio_cursor_y ← -- (byte) conio_cursor_y -- vbuz1=_dec_vbuz1 + // [101] (byte) conio_cursor_y ← -- (byte) conio_cursor_y -- vbuz1=_dec_vbuz1 dec.z conio_cursor_y // cscroll::@return __breturn: // } - // [81] return + // [102] return rts - // [82] phi from cscroll::@1 to cscroll::@3 [phi:cscroll::@1->cscroll::@3] + // cscroll::@2 __b2: - // [82] phi (byte*) cscroll::line1#2 = (byte*) cscroll::line1#6 [phi:cscroll::@1->cscroll::@3#0] -- register_copy - // [82] phi (byte*) cscroll::line2#2 = (byte*) cscroll::line2#6 [phi:cscroll::@1->cscroll::@3#1] -- register_copy - // [82] phi (byte) cscroll::x#2 = (byte) 0 [phi:cscroll::@1->cscroll::@3#2] -- vbuyy=vbuc1 - ldy #0 - // cscroll::@3 - __b3: - // for(char x=0;xcscroll::@1] - // [75] phi (byte*) cscroll::line1#6 = (byte*) cscroll::line1#2 [phi:cscroll::@5->cscroll::@1#0] -- register_copy - // [75] phi (byte*) cscroll::line2#6 = (byte*) cscroll::line2#2 [phi:cscroll::@5->cscroll::@1#1] -- register_copy - // [75] phi (byte) cscroll::y#2 = (byte) cscroll::y#1 [phi:cscroll::@5->cscroll::@1#2] -- register_copy - jmp __b1 - // cscroll::@4 - __b4: - // ppuDataGet(line2++) - // [85] (nomodify void*) ppuDataGet::ppuData#0 ← (void*)(byte*) cscroll::line2#2 -- pvoz1=pvoz2 + // ppuDataFetch(scroll_buffer, line2, CONIO_WIDTH) + // [103] (nomodify void*) ppuDataFetch::ppuData#0 ← (void*)(byte*) cscroll::line2#2 -- pvoz1=pvoz2 lda.z line2 - sta.z ppuDataGet.ppuData + sta.z ppuDataFetch.ppuData lda.z line2+1 - sta.z ppuDataGet.ppuData+1 - // [86] call ppuDataGet - // [102] phi from cscroll::@4 to ppuDataGet [phi:cscroll::@4->ppuDataGet] - jsr ppuDataGet - // ppuDataGet(line2++) - // [87] (byte) ppuDataGet::return#2 ← (byte) ppuDataGet::ppuDataRead1_return#0 - // cscroll::@7 - // ch = ppuDataGet(line2++) - // [88] (byte) cscroll::ch#0 ← (byte) ppuDataGet::return#2 -- vbuxx=vbuaa - tax - // [89] (byte*) cscroll::line2#1 ← ++ (byte*) cscroll::line2#2 -- pbuz1=_inc_pbuz1 - inc.z line2 - bne !+ - inc.z line2+1 - !: - // ppuDataSet(line1++, ch) - // [90] (nomodify void*) ppuDataSet::ppuData#1 ← (void*)(byte*) cscroll::line1#2 -- pvoz1=pvoz2 + sta.z ppuDataFetch.ppuData+1 + // [104] call ppuDataFetch + // [123] phi from cscroll::@2 to ppuDataFetch [phi:cscroll::@2->ppuDataFetch] + jsr ppuDataFetch + // cscroll::@4 + // ppuDataTransfer(line1, scroll_buffer, CONIO_WIDTH) + // [105] (nomodify void*) ppuDataTransfer::ppuData#0 ← (void*)(byte*) cscroll::line1#2 -- pvoz1=pvoz2 lda.z line1 - sta.z ppuDataSet.ppuData + sta.z ppuDataTransfer.ppuData lda.z line1+1 - sta.z ppuDataSet.ppuData+1 - // [91] (byte) ppuDataSet::val#1 ← (byte) cscroll::ch#0 - // [92] call ppuDataSet - // [95] phi from cscroll::@7 to ppuDataSet [phi:cscroll::@7->ppuDataSet] - // [95] phi (byte) ppuDataSet::val#2 = (byte) ppuDataSet::val#1 [phi:cscroll::@7->ppuDataSet#0] -- register_copy - // [95] phi (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 = (nomodify void*) ppuDataSet::ppuData#1 [phi:cscroll::@7->ppuDataSet#1] -- register_copy - jsr ppuDataSet - // cscroll::@8 - // ppuDataSet(line1++, ch); - // [93] (byte*) cscroll::line1#1 ← ++ (byte*) cscroll::line1#2 -- pbuz1=_inc_pbuz1 - inc.z line1 - bne !+ + sta.z ppuDataTransfer.ppuData+1 + // [106] call ppuDataTransfer + // [110] phi from cscroll::@4 to ppuDataTransfer [phi:cscroll::@4->ppuDataTransfer] + // [110] phi (word) ppuDataTransfer::size#3 = (byte) $20 [phi:cscroll::@4->ppuDataTransfer#0] -- vwuz1=vbuc1 + lda #<$20 + sta.z ppuDataTransfer.size + lda #>$20 + sta.z ppuDataTransfer.size+1 + // [110] phi (nomodify void*) ppuDataTransfer::cpuData#2 = (void*)(const byte*) scroll_buffer [phi:cscroll::@4->ppuDataTransfer#1] -- pvoz1=pvoc1 + lda #scroll_buffer + sta.z ppuDataTransfer.cpuData+1 + // [110] phi (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 = (nomodify void*) ppuDataTransfer::ppuData#0 [phi:cscroll::@4->ppuDataTransfer#2] -- register_copy + jsr ppuDataTransfer + // cscroll::@5 + // line1 += CONIO_WIDTH + // [107] (byte*) cscroll::line1#1 ← (byte*) cscroll::line1#2 + (byte) $20 -- pbuz1=pbuz1_plus_vbuc1 + lda #$20 + clc + adc.z line1 + sta.z line1 + bcc !+ inc.z line1+1 !: - // for(char x=0;xcscroll::@3] - // [82] phi (byte*) cscroll::line1#2 = (byte*) cscroll::line1#1 [phi:cscroll::@8->cscroll::@3#0] -- register_copy - // [82] phi (byte*) cscroll::line2#2 = (byte*) cscroll::line2#1 [phi:cscroll::@8->cscroll::@3#1] -- register_copy - // [82] phi (byte) cscroll::x#2 = (byte) cscroll::x#1 [phi:cscroll::@8->cscroll::@3#2] -- register_copy - jmp __b3 + // line2 += CONIO_WIDTH + // [108] (byte*) cscroll::line2#1 ← (byte*) cscroll::line2#2 + (byte) $20 -- pbuz1=pbuz1_plus_vbuc1 + lda #$20 + clc + adc.z line2 + sta.z line2 + bcc !+ + inc.z line2+1 + !: + // for(char y=0;ycscroll::@1] + // [96] phi (byte*) cscroll::line1#2 = (byte*) cscroll::line1#1 [phi:cscroll::@5->cscroll::@1#0] -- register_copy + // [96] phi (byte*) cscroll::line2#2 = (byte*) cscroll::line2#1 [phi:cscroll::@5->cscroll::@1#1] -- register_copy + // [96] phi (byte) cscroll::y#2 = (byte) cscroll::y#1 [phi:cscroll::@5->cscroll::@1#2] -- register_copy + jmp __b1 } - // ppuDataSet -// Set one byte in PPU memory + // ppuDataTransfer +// Transfer a number of bytes from the CPU memory to the PPU memory +// - cpuData : Pointer to the CPU memory (RAM of ROM) // - ppuData : Pointer in the PPU memory -// - val : The value to set -// ppuDataSet(byte* zp(5) ppuData, byte register(X) val) -ppuDataSet: { +// - size : The number of bytes to transfer +// ppuDataTransfer(void* zp(5) ppuData, void* zp(7) cpuData, word zp(9) size) +ppuDataTransfer: { .label ppuDataPrepare1_ppuData = 5 + .label cpuSrc = 7 + .label i = $b .label ppuData = 5 - // ppuDataSet::ppuDataPrepare1 + .label cpuData = 7 + .label size = 9 + // ppuDataTransfer::ppuDataPrepare1 // >ppuData - // [96] (byte~) ppuDataSet::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 -- vbuaa=_hi_pvoz1 + // [111] (byte~) ppuDataTransfer::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 -- vbuaa=_hi_pvoz1 lda.z ppuDataPrepare1_ppuData+1 // PPU->PPUADDR = >ppuData - // [97] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa + // [112] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataTransfer::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR // PPUADDR = PPUDATA = val - // [100] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataSet::val#2 -- _deref_pbuc1=vbuxx - stx PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA - // ppuDataSet::@return + // ppuDataTransfer::@3 + // [115] (byte*) ppuDataTransfer::cpuSrc#6 ← (byte*)(nomodify void*) ppuDataTransfer::cpuData#2 + // [116] phi from ppuDataTransfer::@3 to ppuDataTransfer::@1 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1] + // [116] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*) ppuDataTransfer::cpuSrc#6 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#0] -- register_copy + // [116] phi (word) ppuDataTransfer::i#2 = (word) 0 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#1] -- vwuz1=vwuc1 + lda #<0 + sta.z i + sta.z i+1 + // ppuDataTransfer::@1 + __b1: + // for(unsigned int i=0;iPPUDATA = val + // [120] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 -- _deref_pbuc1=vbuaa + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + // ppuDataTransfer::@4 + // ppuDataPut(*cpuSrc++); + // [121] (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#2 -- pbuz1=_inc_pbuz1 + inc.z cpuSrc + bne !+ + inc.z cpuSrc+1 + !: + // for(unsigned int i=0;ippuDataTransfer::@1] + // [116] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*) ppuDataTransfer::cpuSrc#1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1#0] -- register_copy + // [116] phi (word) ppuDataTransfer::i#2 = (word) ppuDataTransfer::i#1 [phi:ppuDataTransfer::@4->ppuDataTransfer::@1#1] -- register_copy + jmp __b1 } - // ppuDataGet -// Get one byte from PPU memory + // ppuDataFetch +// Transfer a number of bytes from the PPU memory to the CPU memory // - ppuData : Pointer in the PPU memory -// ppuDataGet(void* zp($11) ppuData) -ppuDataGet: { - .label ppuData = $11 - // ppuDataGet::ppuDataPrepare1 +// - cpuData : Pointer to the CPU memory (RAM of ROM) +// - size : The number of bytes to transfer +// ppuDataFetch(void* zp($19) ppuData) +ppuDataFetch: { + .const size = $20 + .label cpuData = scroll_buffer + // Fetch from PPU to CPU + .label cpuDst = 7 + .label i = 5 + .label ppuData = $19 + // ppuDataFetch::ppuDataPrepare1 // >ppuData - // [103] (byte~) ppuDataGet::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataGet::ppuData#0 -- vbuaa=_hi_pvoz1 + // [124] (byte~) ppuDataFetch::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFetch::ppuData#0 -- vbuaa=_hi_pvoz1 lda.z ppuData+1 // PPU->PPUADDR = >ppuData - // [104] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataGet::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa + // [125] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFetch::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR // PPUADDR = PPUDATA; - // [107] (byte) ppuDataGet::ppuDataRead1_return#0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) -- vbuaa=_deref_pbuc1 - lda PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA - // ppuDataGet::@return + // ppuDataFetch::@2 + // asm + // asm { ldaPPU_PPUDATA } + // Perform a dummy-read to discard the current value in the data read buffer and update it with the first byte from the PPU address + lda PPU_PPUDATA + // [129] phi from ppuDataFetch::@2 to ppuDataFetch::@1 [phi:ppuDataFetch::@2->ppuDataFetch::@1] + // [129] phi (byte*) ppuDataFetch::cpuDst#2 = (byte*)(const nomodify void*) ppuDataFetch::cpuData#0 [phi:ppuDataFetch::@2->ppuDataFetch::@1#0] -- pbuz1=pbuc1 + lda #cpuData + sta.z cpuDst+1 + // [129] phi (word) ppuDataFetch::i#2 = (word) 0 [phi:ppuDataFetch::@2->ppuDataFetch::@1#1] -- vwuz1=vwuc1 + lda #<0 + sta.z i + sta.z i+1 + // ppuDataFetch::@1 + __b1: + // for(unsigned int i=0;isize + bcc ppuDataRead1 + bne !+ + lda.z i + cmp #PPUDATA; + // [132] (byte) ppuDataFetch::ppuDataRead1_return#0 ← *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) -- vbuaa=_deref_pbuc1 + lda PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + // ppuDataFetch::@3 + // *cpuDst++ = ppuDataRead() + // [133] *((byte*) ppuDataFetch::cpuDst#2) ← (byte) ppuDataFetch::ppuDataRead1_return#0 -- _deref_pbuz1=vbuaa + ldy #0 + sta (cpuDst),y + // *cpuDst++ = ppuDataRead(); + // [134] (byte*) ppuDataFetch::cpuDst#1 ← ++ (byte*) ppuDataFetch::cpuDst#2 -- pbuz1=_inc_pbuz1 + inc.z cpuDst + bne !+ + inc.z cpuDst+1 + !: + // for(unsigned int i=0;ippuDataFetch::@1] + // [129] phi (byte*) ppuDataFetch::cpuDst#2 = (byte*) ppuDataFetch::cpuDst#1 [phi:ppuDataFetch::@3->ppuDataFetch::@1#0] -- register_copy + // [129] phi (word) ppuDataFetch::i#2 = (word) ppuDataFetch::i#1 [phi:ppuDataFetch::@3->ppuDataFetch::@1#1] -- register_copy + jmp __b1 } // ppuDataFill // Fill a number of bytes in the PPU memory // - ppuData : Pointer in the PPU memory // - size : The number of bytes to transfer -// ppuDataFill(byte register(X) val, word zp($11) size) +// ppuDataFill(byte register(X) val, word zp($b) size) ppuDataFill: { - .label ppuDataPrepare1_ppuData = 5 - .label i = 9 - .label size = $11 + .label ppuDataPrepare1_ppuData = 9 + .label i = $19 + .label size = $b // ppuDataFill::ppuDataPrepare1 // >ppuData - // [110] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 -- vbuaa=_hi_pvoz1 + // [137] (byte~) ppuDataFill::ppuDataPrepare1_$0 ← > (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 -- vbuaa=_hi_pvoz1 lda.z ppuDataPrepare1_ppuData+1 // PPU->PPUADDR = >ppuData - // [111] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa + // [138] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataFill::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuaa sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR // PPUADDR = ppuDataFill::@1] - // [114] phi (word) ppuDataFill::i#2 = (word) 0 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1#0] -- vwuz1=vwuc1 + // [141] phi from ppuDataFill::ppuDataPrepare1 to ppuDataFill::@1 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1] + // [141] phi (word) ppuDataFill::i#2 = (word) 0 [phi:ppuDataFill::ppuDataPrepare1->ppuDataFill::@1#0] -- vwuz1=vwuc1 lda #<0 sta.z i sta.z i+1 @@ -6178,7 +9319,7 @@ ppuDataFill: { // ppuDataFill::@1 __b1: // for(unsigned int i=0;iPPUDATA = val - // [117] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataFill::val#10 -- _deref_pbuc1=vbuxx + // [144] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataFill::val#10 -- _deref_pbuc1=vbuxx stx PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA // ppuDataFill::@2 // for(unsigned int i=0;ippuDataFill::@1] - // [114] phi (word) ppuDataFill::i#2 = (word) ppuDataFill::i#1 [phi:ppuDataFill::@2->ppuDataFill::@1#0] -- register_copy + // [141] phi from ppuDataFill::@2 to ppuDataFill::@1 [phi:ppuDataFill::@2->ppuDataFill::@1] + // [141] phi (word) ppuDataFill::i#2 = (word) ppuDataFill::i#1 [phi:ppuDataFill::@2->ppuDataFill::@1#0] -- register_copy + jmp __b1 +} + // ppuDataSet +// Set one byte in PPU memory +// - ppuData : Pointer in the PPU memory +// - val : The value to set +// ppuDataSet(byte* zp($17) ppuData, byte register(A) val) +ppuDataSet: { + .label ppuData = $17 + // ppuDataSet::ppuDataPrepare1 + // >ppuData + // [147] (byte~) ppuDataSet::ppuDataPrepare1_$0 ← > (void*)(nomodify byte*) ppuDataSet::ppuData#0 -- vbuxx=_hi_pvoz1 + ldx.z ppuData+1 + // PPU->PPUADDR = >ppuData + // [148] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← (byte~) ppuDataSet::ppuDataPrepare1_$0 -- _deref_pbuc1=vbuxx + stx PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR + // PPUADDR = PPUDATA = val + // [151] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataSet::val#0 -- _deref_pbuc1=vbuaa + sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA + // ppuDataSet::@return + // } + // [152] return + rts +} + // gotoxy +// Set the cursor to the specified position +// gotoxy(byte register(X) x, byte register(A) y) +gotoxy: { + .label __5 = $13 + .label __6 = $13 + .label line_offset = $13 + // if(y>CONIO_HEIGHT) + // [154] if((byte) gotoxy::y#4<(byte) $1e+(byte) 1) goto gotoxy::@3 -- vbuaa_lt_vbuc1_then_la1 + cmp #$1e+1 + bcc __b1 + // [156] phi from gotoxy to gotoxy::@1 [phi:gotoxy->gotoxy::@1] + // [156] phi (byte) gotoxy::y#5 = (byte) 0 [phi:gotoxy->gotoxy::@1#0] -- vbuaa=vbuc1 + lda #0 + // [155] phi from gotoxy to gotoxy::@3 [phi:gotoxy->gotoxy::@3] + // gotoxy::@3 + // [156] phi from gotoxy::@3 to gotoxy::@1 [phi:gotoxy::@3->gotoxy::@1] + // [156] phi (byte) gotoxy::y#5 = (byte) gotoxy::y#4 [phi:gotoxy::@3->gotoxy::@1#0] -- register_copy + // gotoxy::@1 + __b1: + // if(x>=CONIO_WIDTH) + // [157] if((byte) gotoxy::x#4<(byte) $20) goto gotoxy::@4 -- vbuxx_lt_vbuc1_then_la1 + cpx #$20 + bcc __b2 + // [159] phi from gotoxy::@1 to gotoxy::@2 [phi:gotoxy::@1->gotoxy::@2] + // [159] phi (byte) gotoxy::x#5 = (byte) 0 [phi:gotoxy::@1->gotoxy::@2#0] -- vbuxx=vbuc1 + ldx #0 + // [158] phi from gotoxy::@1 to gotoxy::@4 [phi:gotoxy::@1->gotoxy::@4] + // gotoxy::@4 + // [159] phi from gotoxy::@4 to gotoxy::@2 [phi:gotoxy::@4->gotoxy::@2] + // [159] phi (byte) gotoxy::x#5 = (byte) gotoxy::x#4 [phi:gotoxy::@4->gotoxy::@2#0] -- register_copy + // gotoxy::@2 + __b2: + // conio_cursor_x = x + // [160] (byte) conio_cursor_x ← (byte) gotoxy::x#5 -- vbuz1=vbuxx + stx.z conio_cursor_x + // conio_cursor_y = y + // [161] (byte) conio_cursor_y ← (byte) gotoxy::y#5 -- vbuz1=vbuaa + sta.z conio_cursor_y + // (unsigned int)y*CONIO_WIDTH + // [162] (word~) gotoxy::$6 ← (word)(byte) gotoxy::y#5 -- vwuz1=_word_vbuaa + sta.z __6 + lda #0 + sta.z __6+1 + // line_offset = (unsigned int)y*CONIO_WIDTH + // [163] (word) gotoxy::line_offset#0 ← (word~) gotoxy::$6 << (byte) 5 -- vwuz1=vwuz1_rol_5 + asl.z line_offset + rol.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + asl.z line_offset + rol.z line_offset+1 + // CONIO_SCREEN_TEXT + line_offset + // [164] (byte*~) gotoxy::$5 ← (const nomodify byte*) PPU_NAME_TABLE_0 + (word) gotoxy::line_offset#0 -- pbuz1=pbuc1_plus_vwuz1 + clc + lda.z __5 + adc #PPU_NAME_TABLE_0 + sta.z __5+1 + // conio_line_text = CONIO_SCREEN_TEXT + line_offset + // [165] (byte*) conio_line_text ← (byte*~) gotoxy::$5 + // gotoxy::@return + // } + // [166] return + rts +} + // cputsxy +// Move cursor and output a NUL-terminated string +// Same as "gotoxy (x, y); puts (s);" +// cputsxy(byte register(X) x, byte register(A) y) +cputsxy: { + // gotoxy(x, y) + // [167] (byte) gotoxy::x#3 ← (byte) cputsxy::x#0 + // [168] (byte) gotoxy::y#3 ← (byte) cputsxy::y#0 + // [169] call gotoxy + // [153] phi from cputsxy to gotoxy [phi:cputsxy->gotoxy] + // [153] phi (byte) gotoxy::x#4 = (byte) gotoxy::x#3 [phi:cputsxy->gotoxy#0] -- register_copy + // [153] phi (byte) gotoxy::y#4 = (byte) gotoxy::y#3 [phi:cputsxy->gotoxy#1] -- register_copy + jsr gotoxy + // [170] phi from cputsxy to cputsxy::@1 [phi:cputsxy->cputsxy::@1] + // cputsxy::@1 + // cputs(s) + // [171] call cputs + // [173] phi from cputsxy::@1 to cputs [phi:cputsxy::@1->cputs] + jsr cputs + // cputsxy::@return + // } + // [172] return + rts +} + // cputs +// Output a NUL-terminated string at the current cursor position +// cputs(byte* zp($d) s) +cputs: { + .label s = $d + // [174] phi from cputs to cputs::@1 [phi:cputs->cputs::@1] + // [174] phi (to_nomodify byte*) cputs::s#2 = (const byte*) num_buffer [phi:cputs->cputs::@1#0] -- pbuz1=pbuc1 + lda #num_buffer + sta.z s+1 + // cputs::@1 + __b1: + // c=*s++ + // [175] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#2) -- vbuaa=_deref_pbuz1 + ldy #0 + lda (s),y + // while(c=*s++) + // [176] (to_nomodify byte*) cputs::s#0 ← ++ (to_nomodify byte*) cputs::s#2 -- pbuz1=_inc_pbuz1 + inc.z s + bne !+ + inc.z s+1 + !: + // [177] if((byte) 0!=(byte) cputs::c#1) goto cputs::@2 -- vbuc1_neq_vbuaa_then_la1 + cmp #0 + bne __b2 + // cputs::@return + // } + // [178] return + rts + // cputs::@2 + __b2: + // cputc(c) + // [179] (byte) cputc::c#0 ← (byte) cputs::c#1 -- vbuxx=vbuaa + tax + // [180] call cputc + // [78] phi from cputs::@2 to cputc [phi:cputs::@2->cputc] + // [78] phi (byte) cputc::c#2 = (byte) cputc::c#0 [phi:cputs::@2->cputc#0] -- register_copy + jsr cputc + // [174] phi from cputs::@2 to cputs::@1 [phi:cputs::@2->cputs::@1] + // [174] phi (to_nomodify byte*) cputs::s#2 = (to_nomodify byte*) cputs::s#0 [phi:cputs::@2->cputs::@1#0] -- register_copy + jmp __b1 +} + // uctoa +// Converts unsigned number value to a string representing it in RADIX format. +// If the leading digits are zero they are not included in the string. +// - value : The number to be converted to RADIX +// - buffer : receives the string representing the number and zero-termination. +// - radix : The radix to convert the number to (from the enum RADIX) +// uctoa(byte register(X) value, byte* zp($f) buffer) +uctoa: { + .const max_digits = 2 + .label digit_value = $1b + .label buffer = $f + .label digit = $11 + .label started = $12 + // [182] phi from uctoa to uctoa::@1 [phi:uctoa->uctoa::@1] + // [182] phi (byte*) uctoa::buffer#11 = (const byte*) num_buffer [phi:uctoa->uctoa::@1#0] -- pbuz1=pbuc1 + lda #num_buffer + sta.z buffer+1 + // [182] phi (byte) uctoa::started#2 = (byte) 0 [phi:uctoa->uctoa::@1#1] -- vbuz1=vbuc1 + lda #0 + sta.z started + // [182] phi (byte) uctoa::value#2 = (byte) uctoa::value#1 [phi:uctoa->uctoa::@1#2] -- register_copy + // [182] phi (byte) uctoa::digit#2 = (byte) 0 [phi:uctoa->uctoa::@1#3] -- vbuz1=vbuc1 + sta.z digit + // uctoa::@1 + __b1: + // for( char digit=0; digit= digit_value) + // [189] if((byte) 0!=(byte) uctoa::started#2) goto uctoa::@5 -- vbuc1_neq_vbuz1_then_la1 + lda #0 + cmp.z started + bne __b5 + // uctoa::@7 + // [190] if((byte) uctoa::value#2>=(byte) uctoa::digit_value#0) goto uctoa::@5 -- vbuxx_ge_vbuz1_then_la1 + cpx.z digit_value + bcs __b5 + // [191] phi from uctoa::@7 to uctoa::@4 [phi:uctoa::@7->uctoa::@4] + // [191] phi (byte*) uctoa::buffer#14 = (byte*) uctoa::buffer#11 [phi:uctoa::@7->uctoa::@4#0] -- register_copy + // [191] phi (byte) uctoa::started#4 = (byte) uctoa::started#2 [phi:uctoa::@7->uctoa::@4#1] -- register_copy + // [191] phi (byte) uctoa::value#6 = (byte) uctoa::value#2 [phi:uctoa::@7->uctoa::@4#2] -- register_copy + // uctoa::@4 + __b4: + // for( char digit=0; digituctoa::@1] + // [182] phi (byte*) uctoa::buffer#11 = (byte*) uctoa::buffer#14 [phi:uctoa::@4->uctoa::@1#0] -- register_copy + // [182] phi (byte) uctoa::started#2 = (byte) uctoa::started#4 [phi:uctoa::@4->uctoa::@1#1] -- register_copy + // [182] phi (byte) uctoa::value#2 = (byte) uctoa::value#6 [phi:uctoa::@4->uctoa::@1#2] -- register_copy + // [182] phi (byte) uctoa::digit#2 = (byte) uctoa::digit#1 [phi:uctoa::@4->uctoa::@1#3] -- register_copy + jmp __b1 + // uctoa::@5 + __b5: + // uctoa_append(buffer++, value, digit_value) + // [193] (byte*) uctoa_append::buffer#0 ← (byte*) uctoa::buffer#11 + // [194] (byte) uctoa_append::value#0 ← (byte) uctoa::value#2 + // [195] (byte) uctoa_append::sub#0 ← (byte) uctoa::digit_value#0 + // [196] call uctoa_append + // [200] phi from uctoa::@5 to uctoa_append [phi:uctoa::@5->uctoa_append] + jsr uctoa_append + // uctoa_append(buffer++, value, digit_value) + // [197] (byte) uctoa_append::return#0 ← (byte) uctoa_append::value#2 + // uctoa::@6 + // value = uctoa_append(buffer++, value, digit_value) + // [198] (byte) uctoa::value#0 ← (byte) uctoa_append::return#0 + // value = uctoa_append(buffer++, value, digit_value); + // [199] (byte*) uctoa::buffer#4 ← ++ (byte*) uctoa::buffer#11 -- pbuz1=_inc_pbuz1 + inc.z buffer + bne !+ + inc.z buffer+1 + !: + // [191] phi from uctoa::@6 to uctoa::@4 [phi:uctoa::@6->uctoa::@4] + // [191] phi (byte*) uctoa::buffer#14 = (byte*) uctoa::buffer#4 [phi:uctoa::@6->uctoa::@4#0] -- register_copy + // [191] phi (byte) uctoa::started#4 = (byte) 1 [phi:uctoa::@6->uctoa::@4#1] -- vbuz1=vbuc1 + lda #1 + sta.z started + // [191] phi (byte) uctoa::value#6 = (byte) uctoa::value#0 [phi:uctoa::@6->uctoa::@4#2] -- register_copy + jmp __b4 +} + // uctoa_append +// Used to convert a single digit of an unsigned number value to a string representation +// Counts a single digit up from '0' as long as the value is larger than sub. +// Each time the digit is increased sub is subtracted from value. +// - buffer : pointer to the char that receives the digit +// - value : The value where the digit will be derived from +// - sub : the value of a '1' in the digit. Subtracted continually while the digit is increased. +// (For decimal the subs used are 10000, 1000, 100, 10, 1) +// returns : the value reduced by sub * digit so that it is less than sub. +// uctoa_append(byte* zp($f) buffer, byte register(X) value, byte zp($1b) sub) +uctoa_append: { + .label buffer = $f + .label sub = $1b + // [201] phi from uctoa_append to uctoa_append::@1 [phi:uctoa_append->uctoa_append::@1] + // [201] phi (byte) uctoa_append::digit#2 = (byte) 0 [phi:uctoa_append->uctoa_append::@1#0] -- vbuyy=vbuc1 + ldy #0 + // [201] phi (byte) uctoa_append::value#2 = (byte) uctoa_append::value#0 [phi:uctoa_append->uctoa_append::@1#1] -- register_copy + // uctoa_append::@1 + __b1: + // while (value >= sub) + // [202] if((byte) uctoa_append::value#2>=(byte) uctoa_append::sub#0) goto uctoa_append::@2 -- vbuxx_ge_vbuz1_then_la1 + cpx.z sub + bcs __b2 + // uctoa_append::@3 + // *buffer = DIGITS[digit] + // [203] *((byte*) uctoa_append::buffer#0) ← *((const byte*) DIGITS + (byte) uctoa_append::digit#2) -- _deref_pbuz1=pbuc1_derefidx_vbuyy + lda DIGITS,y + ldy #0 + sta (buffer),y + // uctoa_append::@return + // } + // [204] return + rts + // uctoa_append::@2 + __b2: + // digit++; + // [205] (byte) uctoa_append::digit#1 ← ++ (byte) uctoa_append::digit#2 -- vbuyy=_inc_vbuyy + iny + // value -= sub + // [206] (byte) uctoa_append::value#1 ← (byte) uctoa_append::value#2 - (byte) uctoa_append::sub#0 -- vbuxx=vbuxx_minus_vbuz1 + txa + sec + sbc.z sub + tax + // [201] phi from uctoa_append::@2 to uctoa_append::@1 [phi:uctoa_append::@2->uctoa_append::@1] + // [201] phi (byte) uctoa_append::digit#2 = (byte) uctoa_append::digit#1 [phi:uctoa_append::@2->uctoa_append::@1#0] -- register_copy + // [201] phi (byte) uctoa_append::value#2 = (byte) uctoa_append::value#1 [phi:uctoa_append::@2->uctoa_append::@1#1] -- register_copy jmp __b1 } // clrscr // clears the screen and moves the cursor to the upper left-hand corner of the screen. clrscr: { // ppuDataFill(CONIO_SCREEN_TEXT, ' ', 0x3c0) - // [120] call ppuDataFill - // [109] phi from clrscr to ppuDataFill [phi:clrscr->ppuDataFill] - // [109] phi (byte) ppuDataFill::val#10 = (byte) ' ' [phi:clrscr->ppuDataFill#0] -- vbuxx=vbuc1 + // [208] call ppuDataFill + // [136] phi from clrscr to ppuDataFill [phi:clrscr->ppuDataFill] + // [136] phi (byte) ppuDataFill::val#10 = (byte) ' ' [phi:clrscr->ppuDataFill#0] -- vbuxx=vbuc1 ldx #' ' - // [109] phi (word) ppuDataFill::size#5 = (word) $3c0 [phi:clrscr->ppuDataFill#1] -- vwuz1=vwuc1 + // [136] phi (word) ppuDataFill::size#5 = (word) $3c0 [phi:clrscr->ppuDataFill#1] -- vwuz1=vwuc1 lda #<$3c0 sta.z ppuDataFill.size lda #>$3c0 sta.z ppuDataFill.size+1 - // [109] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0 [phi:clrscr->ppuDataFill#2] -- pvoz1=pvoc1 + // [136] phi (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 = (void*)(const nomodify byte*) PPU_NAME_TABLE_0 [phi:clrscr->ppuDataFill#2] -- pvoz1=pvoc1 lda #PPU_NAME_TABLE_0 @@ -6228,97 +9698,22 @@ clrscr: { jsr ppuDataFill // clrscr::@1 // conio_cursor_x = 0 - // [121] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1 + // [209] (byte) conio_cursor_x ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta.z conio_cursor_x // conio_cursor_y = 0 - // [122] (byte) conio_cursor_y ← (byte) 0 -- vbuz1=vbuc1 + // [210] (byte) conio_cursor_y ← (byte) 0 -- vbuz1=vbuc1 sta.z conio_cursor_y // conio_line_text = CONIO_SCREEN_TEXT - // [123] (byte*) conio_line_text ← (const nomodify byte*) PPU_NAME_TABLE_0 -- pbuz1=pbuc1 + // [211] (byte*) conio_line_text ← (const nomodify byte*) PPU_NAME_TABLE_0 -- pbuz1=pbuc1 lda #PPU_NAME_TABLE_0 sta.z conio_line_text+1 // clrscr::@return // } - // [124] return + // [212] return rts -} - // ppuDataTransfer -// Transfer a number of bytes from the CPU memory to the PPU memory -// - cpuData : Pointer to the CPU memory (RAM of ROM) -// - ppuData : Pointer in the PPU memory -// - size : The number of bytes to transfer -ppuDataTransfer: { - .const size = $20*SIZEOF_BYTE - .label ppuData = PPU_PALETTE - .label cpuData = PALETTE - // Transfer to PPU - .label cpuSrc = 9 - .label i = 7 - // ppuDataTransfer::ppuDataPrepare1 - // PPU->PPUADDR = >ppuData - // [126] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUADDR) ← >(const nomodify void*) ppuDataTransfer::ppuData#0 -- _deref_pbuc1=vbuc2 - lda #>ppuData - sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUADDR - // PPU->PPUADDR = ppuDataTransfer::@1] - // [128] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*)(const nomodify void*) ppuDataTransfer::cpuData#0 [phi:ppuDataTransfer::ppuDataPrepare1->ppuDataTransfer::@1#0] -- pbuz1=pbuc1 - lda #cpuData - sta.z cpuSrc+1 - // [128] phi (word) ppuDataTransfer::i#2 = (word) 0 [phi:ppuDataTransfer::ppuDataPrepare1->ppuDataTransfer::@1#1] -- vwuz1=vwuc1 - lda #<0 - sta.z i - sta.z i+1 - // ppuDataTransfer::@1 - __b1: - // for(unsigned int i=0;isize - bcc __b2 - bne !+ - lda.z i - cmp #PPUDATA = val - // [132] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUDATA) ← (byte) ppuDataTransfer::ppuDataPut1_val#0 -- _deref_pbuc1=vbuaa - sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUDATA - // ppuDataTransfer::@3 - // ppuDataPut(*cpuSrc++); - // [133] (byte*) ppuDataTransfer::cpuSrc#1 ← ++ (byte*) ppuDataTransfer::cpuSrc#2 -- pbuz1=_inc_pbuz1 - inc.z cpuSrc - bne !+ - inc.z cpuSrc+1 - !: - // for(unsigned int i=0;ippuDataTransfer::@1] - // [128] phi (byte*) ppuDataTransfer::cpuSrc#2 = (byte*) ppuDataTransfer::cpuSrc#1 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#0] -- register_copy - // [128] phi (word) ppuDataTransfer::i#2 = (word) ppuDataTransfer::i#1 [phi:ppuDataTransfer::@3->ppuDataTransfer::@1#1] -- register_copy - jmp __b1 } // vblank // NMI Called when the PPU refreshes the screen (also known as the V-Blank period) @@ -6330,98 +9725,98 @@ vblank: { tya pha // readJoy1() - // [136] call readJoy1 + // [214] call readJoy1 jsr readJoy1 - // [137] (byte) readJoy1::return#2 ← (byte) readJoy1::joy#2 + // [215] (byte) readJoy1::return#2 ← (byte) readJoy1::joy#2 // vblank::@11 // joy = readJoy1() - // [138] (byte) vblank::joy#0 ← (byte) readJoy1::return#2 -- vbuxx=vbuaa + // [216] (byte) vblank::joy#0 ← (byte) readJoy1::return#2 -- vbuxx=vbuaa tax // joy&JOY_DOWN - // [139] (byte~) vblank::$1 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_DOWN -- vbuaa=vbuxx_band_vbuc1 + // [217] (byte~) vblank::$1 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_DOWN -- vbuaa=vbuxx_band_vbuc1 txa and #JOY_DOWN // if(joy&JOY_DOWN) - // [140] if((byte) 0==(byte~) vblank::$1) goto vblank::@1 -- vbuc1_eq_vbuaa_then_la1 + // [218] if((byte) 0==(byte~) vblank::$1) goto vblank::@1 -- vbuc1_eq_vbuaa_then_la1 cmp #0 beq __b1 // vblank::@5 // if(++y_scroll==240) - // [141] (volatile byte) y_scroll ← ++ (volatile byte) y_scroll -- vbuz1=_inc_vbuz1 + // [219] (volatile byte) y_scroll ← ++ (volatile byte) y_scroll -- vbuz1=_inc_vbuz1 inc.z y_scroll - // [142] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 -- vbuz1_neq_vbuc1_then_la1 + // [220] if((volatile byte) y_scroll!=(byte) $f0) goto vblank::@1 -- vbuz1_neq_vbuc1_then_la1 lda #$f0 cmp.z y_scroll bne __b1 // vblank::@6 // y_scroll=0 - // [143] (volatile byte) y_scroll ← (byte) 0 -- vbuz1=vbuc1 + // [221] (volatile byte) y_scroll ← (byte) 0 -- vbuz1=vbuc1 lda #0 sta.z y_scroll // vblank::@1 __b1: // joy&JOY_UP - // [144] (byte~) vblank::$3 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_UP -- vbuaa=vbuxx_band_vbuc1 + // [222] (byte~) vblank::$3 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_UP -- vbuaa=vbuxx_band_vbuc1 txa and #JOY_UP // if(joy&JOY_UP) - // [145] if((byte) 0==(byte~) vblank::$3) goto vblank::@2 -- vbuc1_eq_vbuaa_then_la1 + // [223] if((byte) 0==(byte~) vblank::$3) goto vblank::@2 -- vbuc1_eq_vbuaa_then_la1 cmp #0 beq __b2 // vblank::@7 // if(--y_scroll==255) - // [146] (volatile byte) y_scroll ← -- (volatile byte) y_scroll -- vbuz1=_dec_vbuz1 + // [224] (volatile byte) y_scroll ← -- (volatile byte) y_scroll -- vbuz1=_dec_vbuz1 dec.z y_scroll - // [147] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 -- vbuz1_neq_vbuc1_then_la1 + // [225] if((volatile byte) y_scroll!=(byte) $ff) goto vblank::@2 -- vbuz1_neq_vbuc1_then_la1 lda #$ff cmp.z y_scroll bne __b2 // vblank::@8 // y_scroll=239 - // [148] (volatile byte) y_scroll ← (byte) $ef -- vbuz1=vbuc1 + // [226] (volatile byte) y_scroll ← (byte) $ef -- vbuz1=vbuc1 lda #$ef sta.z y_scroll // vblank::@2 __b2: // joy&JOY_LEFT - // [149] (byte~) vblank::$5 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_LEFT -- vbuaa=vbuxx_band_vbuc1 + // [227] (byte~) vblank::$5 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_LEFT -- vbuaa=vbuxx_band_vbuc1 txa and #JOY_LEFT // if(joy&JOY_LEFT) - // [150] if((byte) 0==(byte~) vblank::$5) goto vblank::@3 -- vbuc1_eq_vbuaa_then_la1 + // [228] if((byte) 0==(byte~) vblank::$5) goto vblank::@3 -- vbuc1_eq_vbuaa_then_la1 cmp #0 beq __b3 // vblank::@9 // x_scroll++; - // [151] (volatile byte) x_scroll ← ++ (volatile byte) x_scroll -- vbuz1=_inc_vbuz1 + // [229] (volatile byte) x_scroll ← ++ (volatile byte) x_scroll -- vbuz1=_inc_vbuz1 inc.z x_scroll // vblank::@3 __b3: // joy&JOY_RIGHT - // [152] (byte~) vblank::$7 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_RIGHT -- vbuaa=vbuxx_band_vbuc1 + // [230] (byte~) vblank::$7 ← (byte) vblank::joy#0 & (const nomodify byte) JOY_RIGHT -- vbuaa=vbuxx_band_vbuc1 txa and #JOY_RIGHT // if(joy&JOY_RIGHT) - // [153] if((byte) 0==(byte~) vblank::$7) goto vblank::@4 -- vbuc1_eq_vbuaa_then_la1 + // [231] if((byte) 0==(byte~) vblank::$7) goto vblank::@4 -- vbuc1_eq_vbuaa_then_la1 cmp #0 beq __b4 // vblank::@10 // x_scroll--; - // [154] (volatile byte) x_scroll ← -- (volatile byte) x_scroll -- vbuz1=_dec_vbuz1 + // [232] (volatile byte) x_scroll ← -- (volatile byte) x_scroll -- vbuz1=_dec_vbuz1 dec.z x_scroll // vblank::@4 __b4: // PPU->PPUSCROLL = x_scroll - // [155] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) x_scroll -- _deref_pbuc1=vbuz1 + // [233] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) x_scroll -- _deref_pbuc1=vbuz1 lda.z x_scroll sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL // PPU->PPUSCROLL = y_scroll - // [156] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) y_scroll -- _deref_pbuc1=vbuz1 + // [234] *((byte*)(const struct RICOH_2C02*) PPU+(const byte) OFFSET_STRUCT_RICOH_2C02_PPUSCROLL) ← (volatile byte) y_scroll -- _deref_pbuc1=vbuz1 lda.z y_scroll sta PPU+OFFSET_STRUCT_RICOH_2C02_PPUSCROLL // vblank::@return // } - // [157] return - exit interrupt(HARDWARE_STACK) + // [235] return - exit interrupt(HARDWARE_STACK) pla tay pla @@ -6441,52 +9836,60 @@ vblank: { // - bit 6: B // - bit 7: A readJoy1: { - .label __1 = $13 + .label __1 = $1c // APU->JOY1 = 1 - // [158] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 1 -- _deref_pbuc1=vbuc2 + // [236] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 1 -- _deref_pbuc1=vbuc2 // Latch the controller buttons lda #1 sta APU+OFFSET_STRUCT_RICOH_2A03_JOY1 // APU->JOY1 = 0 - // [159] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 0 -- _deref_pbuc1=vbuc2 + // [237] *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) ← (byte) 0 -- _deref_pbuc1=vbuc2 lda #0 sta APU+OFFSET_STRUCT_RICOH_2A03_JOY1 - // [160] phi from readJoy1 to readJoy1::@1 [phi:readJoy1->readJoy1::@1] - // [160] phi (byte) readJoy1::joy#2 = (byte) 0 [phi:readJoy1->readJoy1::@1#0] -- vbuaa=vbuc1 - // [160] phi (byte) readJoy1::i#2 = (byte) 0 [phi:readJoy1->readJoy1::@1#1] -- vbuxx=vbuc1 + // [238] phi from readJoy1 to readJoy1::@1 [phi:readJoy1->readJoy1::@1] + // [238] phi (byte) readJoy1::joy#2 = (byte) 0 [phi:readJoy1->readJoy1::@1#0] -- vbuaa=vbuc1 + // [238] phi (byte) readJoy1::i#2 = (byte) 0 [phi:readJoy1->readJoy1::@1#1] -- vbuxx=vbuc1 tax // readJoy1::@1 __b1: // for(char i=0;i<8;i++) - // [161] if((byte) readJoy1::i#2<(byte) 8) goto readJoy1::@2 -- vbuxx_lt_vbuc1_then_la1 + // [239] if((byte) readJoy1::i#2<(byte) 8) goto readJoy1::@2 -- vbuxx_lt_vbuc1_then_la1 cpx #8 bcc __b2 // readJoy1::@return // } - // [162] return + // [240] return rts // readJoy1::@2 __b2: // joy<<1 - // [163] (byte~) readJoy1::$1 ← (byte) readJoy1::joy#2 << (byte) 1 -- vbuz1=vbuaa_rol_1 + // [241] (byte~) readJoy1::$1 ← (byte) readJoy1::joy#2 << (byte) 1 -- vbuz1=vbuaa_rol_1 asl sta.z __1 // APU->JOY1&1 - // [164] (byte~) readJoy1::$2 ← *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) & (byte) 1 -- vbuaa=_deref_pbuc1_band_vbuc2 + // [242] (byte~) readJoy1::$2 ← *((byte*)(const struct RICOH_2A03*) APU+(const byte) OFFSET_STRUCT_RICOH_2A03_JOY1) & (byte) 1 -- vbuaa=_deref_pbuc1_band_vbuc2 lda #1 and APU+OFFSET_STRUCT_RICOH_2A03_JOY1 // joy = joy<<1 | APU->JOY1&1 - // [165] (byte) readJoy1::joy#1 ← (byte~) readJoy1::$1 | (byte~) readJoy1::$2 -- vbuaa=vbuz1_bor_vbuaa + // [243] (byte) readJoy1::joy#1 ← (byte~) readJoy1::$1 | (byte~) readJoy1::$2 -- vbuaa=vbuz1_bor_vbuaa ora.z __1 // for(char i=0;i<8;i++) - // [166] (byte) readJoy1::i#1 ← ++ (byte) readJoy1::i#2 -- vbuxx=_inc_vbuxx + // [244] (byte) readJoy1::i#1 ← ++ (byte) readJoy1::i#2 -- vbuxx=_inc_vbuxx inx - // [160] phi from readJoy1::@2 to readJoy1::@1 [phi:readJoy1::@2->readJoy1::@1] - // [160] phi (byte) readJoy1::joy#2 = (byte) readJoy1::joy#1 [phi:readJoy1::@2->readJoy1::@1#0] -- register_copy - // [160] phi (byte) readJoy1::i#2 = (byte) readJoy1::i#1 [phi:readJoy1::@2->readJoy1::@1#1] -- register_copy + // [238] phi from readJoy1::@2 to readJoy1::@1 [phi:readJoy1::@2->readJoy1::@1] + // [238] phi (byte) readJoy1::joy#2 = (byte) readJoy1::joy#1 [phi:readJoy1::@2->readJoy1::@1#0] -- register_copy + // [238] phi (byte) readJoy1::i#2 = (byte) readJoy1::i#1 [phi:readJoy1::@2->readJoy1::@1#1] -- register_copy jmp __b1 } // File Data +.segment Data + // The digits used for numbers + DIGITS: .text "0123456789abcdef" + // Values of hexadecimal digits + RADIX_HEXADECIMAL_VALUES_CHAR: .byte $10 +.segment GameRam + num_buffer: .fill $b, 0 + scroll_buffer: .fill $20, 0 .segment Data // Color Palette PALETTE: .byte 1, $21, $f, $30, 1, $21, $f, $30, 1, $21, $f, $30, 1, $21, $f, $30, 1, $f, $30, 8, 1, $f, $18, 8, 1, $30, $37, $1a, $f, $f, $f, $f diff --git a/src/test/ref/examples/nes-conio/nes-conio.sym b/src/test/ref/examples/nes-conio/nes-conio.sym index 40d97f996..c1aa53447 100644 --- a/src/test/ref/examples/nes-conio/nes-conio.sym +++ b/src/test/ref/examples/nes-conio/nes-conio.sym @@ -4,6 +4,7 @@ (label) @begin (label) @end (const struct RICOH_2A03*) APU = (struct RICOH_2A03*) 16384 +(const byte*) DIGITS[] = (byte*) "0123456789abcdef"z (const nomodify byte*) FR_COUNTER = (byte*) 16407 (const nomodify byte) JOY_DOWN = (byte) 4 (const nomodify byte) JOY_LEFT = (byte) 2 @@ -23,7 +24,13 @@ (const nomodify byte*) PPU_ATTRIBUTE_TABLE_1 = (byte*) 10176 (const nomodify byte*) PPU_NAME_TABLE_0 = (byte*) 8192 (const nomodify byte*) PPU_PALETTE = (byte*) 16128 -(const to_volatile byte*) PPU_PPUSTATUS = (byte*) 8194 +(const nomodify to_volatile byte*) PPU_PPUDATA = (byte*) 8199 +(const nomodify to_volatile byte*) PPU_PPUSTATUS = (byte*) 8194 +(const byte) RADIX::BINARY = (number) 2 +(const byte) RADIX::DECIMAL = (number) $a +(const byte) RADIX::HEXADECIMAL = (number) $10 +(const byte) RADIX::OCTAL = (number) 8 +(const byte*) RADIX_HEXADECIMAL_VALUES_CHAR[] = { (byte) $10 } (byte) RICOH_2A03::DMC_FREQ (byte) RICOH_2A03::DMC_LEN (byte) RICOH_2A03::DMC_RAW @@ -73,9 +80,9 @@ (void()) clrscr() (label) clrscr::@1 (label) clrscr::@return -(byte) conio_cursor_x loadstore zp[1]:11 5189.185185185185 -(byte) conio_cursor_y loadstore zp[1]:12 64002.159999999996 -(byte*) conio_line_text loadstore zp[2]:13 45104.24489795918 +(byte) conio_cursor_x loadstore zp[1]:17 4375315.90625 +(byte) conio_cursor_y loadstore zp[1]:18 6.5306328755102046E7 +(byte*) conio_line_text loadstore zp[2]:19 4.9111335755555555E7 (void()) cputc((byte) cputc::c) (label) cputc::@1 (label) cputc::@2 @@ -83,7 +90,22 @@ (label) cputc::@4 (label) cputc::@return (byte) cputc::c -(byte) cputc::c#0 reg byte x 7001.0 +(byte) cputc::c#0 reg byte x 2000002.0 +(byte) cputc::c#1 reg byte x 2002.0 +(byte) cputc::c#2 reg byte x 7000334.666666666 +(void()) cputcxy((byte) cputcxy::x , (byte) cputcxy::y , (byte) cputcxy::c) +(label) cputcxy::@1 +(label) cputcxy::@return +(byte) cputcxy::c +(byte) cputcxy::c#4 reg byte y 250.25 +(byte) cputcxy::x +(byte) cputcxy::x#0 reg byte x 202.0 +(byte) cputcxy::x#1 reg byte x 202.0 +(byte) cputcxy::x#4 reg byte x 1203.0 +(byte) cputcxy::y +(byte) cputcxy::y#2 reg byte a 202.0 +(byte) cputcxy::y#3 reg byte a 202.0 +(byte) cputcxy::y#4 reg byte a 601.5 (void()) cputln() (label) cputln::@return (void()) cputs((to_nomodify byte*) cputs::s) @@ -91,10 +113,18 @@ (label) cputs::@2 (label) cputs::@return (byte) cputs::c -(byte) cputs::c#1 reg byte a 1001.0 +(byte) cputs::c#1 reg byte a 1000001.0 (to_nomodify byte*) cputs::s -(to_nomodify byte*) cputs::s#0 s zp[2]:7 500.5 -(to_nomodify byte*) cputs::s#2 s zp[2]:7 1501.5 +(to_nomodify byte*) cputs::s#0 s zp[2]:13 500000.5 +(to_nomodify byte*) cputs::s#2 s zp[2]:13 1500001.5 +(void()) cputsxy((byte) cputsxy::x , (byte) cputsxy::y , (to_nomodify byte*) cputsxy::s) +(label) cputsxy::@1 +(label) cputsxy::@return +(to_nomodify byte*) cputsxy::s +(byte) cputsxy::x +(byte) cputsxy::x#0 reg byte x 551.0 +(byte) cputsxy::y +(byte) cputsxy::y#0 reg byte a 551.0 (void()) cscroll() (label) cscroll::@1 (label) cscroll::@2 @@ -102,34 +132,59 @@ (label) cscroll::@4 (label) cscroll::@5 (label) cscroll::@6 -(label) cscroll::@7 -(label) cscroll::@8 (label) cscroll::@return -(byte) cscroll::ch -(byte) cscroll::ch#0 reg byte x 6.666666673333334E8 (byte*) cscroll::line1 -(byte*) cscroll::line1#1 line1 zp[2]:3 1.000000001E9 -(byte*) cscroll::line1#2 line1 zp[2]:3 2.0000000036363637E8 -(byte*) cscroll::line1#6 line1 zp[2]:3 1.00000001E8 +(byte*) cscroll::line1#1 line1 zp[2]:23 6.666666666673334E11 +(byte*) cscroll::line1#2 line1 zp[2]:23 3.333333333336667E11 (byte*) cscroll::line2 -(byte*) cscroll::line2#1 line2 zp[2]:9 3.333333336666667E8 -(byte*) cscroll::line2#2 line2 zp[2]:9 3.1428571485714287E8 -(byte*) cscroll::line2#6 line2 zp[2]:9 1.00000001E8 -(byte) cscroll::x -(byte) cscroll::x#1 reg byte y 2.000000002E9 -(byte) cscroll::x#2 reg byte y 2.72727273E8 +(byte*) cscroll::line2#1 line2 zp[2]:15 1.000000000001E12 +(byte*) cscroll::line2#2 line2 zp[2]:15 2.857142857145714E11 (byte) cscroll::y -(byte) cscroll::y#1 y zp[1]:2 2.00000002E8 -(byte) cscroll::y#2 y zp[1]:2 2.142857164285714E7 +(byte) cscroll::y#1 reg byte x 2.000000000002E12 +(byte) cscroll::y#2 reg byte x 3.75000000000375E11 +(void()) gotoxy((byte) gotoxy::x , (byte) gotoxy::y) +(byte*~) gotoxy::$5 zp[2]:19 20002.0 +(word~) gotoxy::$6 zp[2]:19 20002.0 +(label) gotoxy::@1 +(label) gotoxy::@2 +(label) gotoxy::@3 +(label) gotoxy::@4 +(label) gotoxy::@return +(word) gotoxy::line_offset +(word) gotoxy::line_offset#0 line_offset zp[2]:19 20002.0 +(byte) gotoxy::x +(byte) gotoxy::x#2 reg byte x 1001.0 +(byte) gotoxy::x#3 reg byte x 1001.0 +(byte) gotoxy::x#4 reg byte x 3667.333333333333 +(byte) gotoxy::x#5 reg byte x 20002.0 +(byte) gotoxy::y +(byte) gotoxy::y#2 reg byte a 2002.0 +(byte) gotoxy::y#3 reg byte a 2002.0 +(byte) gotoxy::y#4 reg byte a 7334.666666666666 +(byte) gotoxy::y#5 reg byte a 3333.6666666666665 (void()) main() (label) main::@1 +(label) main::@10 +(label) main::@11 +(label) main::@12 +(label) main::@13 +(label) main::@14 +(label) main::@15 +(label) main::@16 +(label) main::@17 +(label) main::@18 (label) main::@2 (label) main::@3 (label) main::@4 (label) main::@5 (label) main::@6 (label) main::@7 +(label) main::@8 +(label) main::@9 (label) main::enableVideoOutput1 +(byte) main::i +(byte) main::i#1 i zp[1]:4 202.0 +(byte) main::i#2 i zp[1]:4 86.57142857142857 (label) main::initNES1 (label) main::initNES1_@1 (label) main::initNES1_@7 @@ -145,84 +200,122 @@ (label) main::initNES1_waitForVBlank2 (byte~) main::initNES1_waitForVBlank2_$0 reg byte a 202.0 (label) main::initNES1_waitForVBlank2_@1 -(const byte*) main::s[(byte) $25] = (byte*) "hello world! -i am nes - look at me - -" +(label) main::screensizex1 +(byte) main::screensizex1_return +(const byte) main::screensizex1_return#0 screensizex1_return = (byte) $20 +(label) main::screensizex2 +(byte) main::screensizex2_return +(const byte) main::screensizex2_return#0 screensizex2_return = (byte) $20 +(label) main::screensizey1 +(byte) main::screensizey1_return +(const byte) main::screensizey1_return#0 screensizey1_return = (byte) $1e +(label) main::screensizey2 +(byte) main::screensizey2_return +(const byte) main::screensizey2_return#0 screensizey2_return = (byte) $1e +(label) main::screensizey3 +(byte) main::screensizey3_return +(const byte) main::screensizey3_return#0 screensizey3_return = (byte) $1e +(byte) main::x +(byte) main::x#1 x zp[1]:2 202.0 +(byte) main::x#10 x zp[1]:2 72.14285714285714 +(byte) main::y +(byte) main::y#1 y zp[1]:3 202.0 +(byte) main::y#10 y zp[1]:3 72.14285714285714 +(const byte*) num_buffer[(number) $b] = { fill( $b, 0) } +(void()) ppuDataFetch((nomodify void*) ppuDataFetch::cpuData , (nomodify void*) ppuDataFetch::ppuData , (word) ppuDataFetch::size) +(label) ppuDataFetch::@1 +(label) ppuDataFetch::@2 +(label) ppuDataFetch::@3 +(label) ppuDataFetch::@return +(nomodify void*) ppuDataFetch::cpuData +(const nomodify void*) ppuDataFetch::cpuData#0 cpuData = (void*)(const byte*) scroll_buffer +(byte*) ppuDataFetch::cpuDst +(byte*) ppuDataFetch::cpuDst#1 cpuDst zp[2]:7 1.0E17 +(byte*) ppuDataFetch::cpuDst#2 cpuDst zp[2]:7 7.5E16 +(word) ppuDataFetch::i +(word) ppuDataFetch::i#1 i zp[2]:5 2.0E17 +(word) ppuDataFetch::i#2 i zp[2]:5 6.0E16 +(nomodify void*) ppuDataFetch::ppuData +(nomodify void*) ppuDataFetch::ppuData#0 ppuData zp[2]:25 5.25000000000075E12 +(label) ppuDataFetch::ppuDataPrepare1 +(byte~) ppuDataFetch::ppuDataPrepare1_$0 reg byte a 2.0000000000002E13 +(byte~) ppuDataFetch::ppuDataPrepare1_$1 reg byte a 2.0000000000002E13 +(nomodify void*) ppuDataFetch::ppuDataPrepare1_ppuData +(label) ppuDataFetch::ppuDataRead1 +(byte) ppuDataFetch::ppuDataRead1_return +(byte) ppuDataFetch::ppuDataRead1_return#0 reg byte a 2.0E17 +(word) ppuDataFetch::size +(const word) ppuDataFetch::size#0 size = (byte) $20 (void()) ppuDataFill((nomodify void*) ppuDataFill::ppuData , (byte) ppuDataFill::val , (word) ppuDataFill::size) (label) ppuDataFill::@1 (label) ppuDataFill::@2 (label) ppuDataFill::@return (word) ppuDataFill::i -(word) ppuDataFill::i#1 i zp[2]:9 2.00000002E8 -(word) ppuDataFill::i#2 i zp[2]:9 1.00000001E8 +(word) ppuDataFill::i#1 i zp[2]:25 2.000000000002E12 +(word) ppuDataFill::i#2 i zp[2]:25 1.000000000001E12 (nomodify void*) ppuDataFill::ppuData (label) ppuDataFill::ppuDataPrepare1 -(byte~) ppuDataFill::ppuDataPrepare1_$0 reg byte a 2.0000002E7 -(byte~) ppuDataFill::ppuDataPrepare1_$1 reg byte a 2.0000002E7 +(byte~) ppuDataFill::ppuDataPrepare1_$0 reg byte a 2.0000000002E10 +(byte~) ppuDataFill::ppuDataPrepare1_$1 reg byte a 2.0000000002E10 (nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData -(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataPrepare1_ppuData zp[2]:5 6666667.333333333 +(nomodify void*) ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataPrepare1_ppuData zp[2]:9 6.666666667333333E9 (label) ppuDataFill::ppuDataPut1 (byte) ppuDataFill::ppuDataPut1_val (word) ppuDataFill::size -(word) ppuDataFill::size#5 size zp[2]:17 1.1111111222222222E7 +(word) ppuDataFill::size#5 size zp[2]:11 1.1111111111122223E11 (byte) ppuDataFill::val -(byte) ppuDataFill::val#10 reg byte x 1.1111111222222222E7 -(byte()) ppuDataGet((nomodify void*) ppuDataGet::ppuData) -(label) ppuDataGet::@return -(nomodify void*) ppuDataGet::ppuData -(nomodify void*) ppuDataGet::ppuData#0 ppuData zp[2]:17 5.25000000075E9 -(label) ppuDataGet::ppuDataPrepare1 -(byte~) ppuDataGet::ppuDataPrepare1_$0 reg byte a 2.0000000002E10 -(byte~) ppuDataGet::ppuDataPrepare1_$1 reg byte a 2.0000000002E10 -(nomodify void*) ppuDataGet::ppuDataPrepare1_ppuData -(label) ppuDataGet::ppuDataRead1 -(byte) ppuDataGet::ppuDataRead1_return -(byte) ppuDataGet::ppuDataRead1_return#0 reg byte a 3.666666667333333E9 -(byte) ppuDataGet::return -(byte) ppuDataGet::return#2 reg byte a 2.000000002E9 +(byte) ppuDataFill::val#10 reg byte x 1.1111111111122223E11 (void()) ppuDataSet((nomodify void*) ppuDataSet::ppuData , (byte) ppuDataSet::val) (label) ppuDataSet::@return (nomodify void*) ppuDataSet::ppuData -(nomodify byte*) ppuDataSet::ppuData#0 ppuData zp[2]:5 5000.5 -(nomodify void*) ppuDataSet::ppuData#1 ppuData zp[2]:5 1.000000001E9 +(nomodify byte*) ppuDataSet::ppuData#0 ppuData zp[2]:23 2000000.2 (label) ppuDataSet::ppuDataPrepare1 -(byte~) ppuDataSet::ppuDataPrepare1_$0 reg byte a 2.0000000002E10 -(byte~) ppuDataSet::ppuDataPrepare1_$1 reg byte a 2.0000000002E10 +(byte~) ppuDataSet::ppuDataPrepare1_$0 reg byte x 2.00000002E8 +(byte~) ppuDataSet::ppuDataPrepare1_$1 reg byte x 2.00000002E8 (nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData -(nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#0 ppuDataPrepare1_ppuData zp[2]:5 7.000003334666666E9 -(nomodify void*) ppuDataSet::ppuDataPrepare1_ppuData#2 ppuDataPrepare1_ppuData zp[2]:5 20002.0 (label) ppuDataSet::ppuDataPut1 (byte) ppuDataSet::ppuDataPut1_val (byte) ppuDataSet::val -(byte) ppuDataSet::val#0 reg byte x 10001.0 -(byte) ppuDataSet::val#1 reg byte x 2.000000002E9 -(byte) ppuDataSet::val#2 reg byte x 2.2000020006E9 +(byte) ppuDataSet::val#0 reg byte a 1.8333333666666668E7 (void()) ppuDataTransfer((nomodify void*) ppuDataTransfer::ppuData , (nomodify void*) ppuDataTransfer::cpuData , (word) ppuDataTransfer::size) (label) ppuDataTransfer::@1 (label) ppuDataTransfer::@2 (label) ppuDataTransfer::@3 +(label) ppuDataTransfer::@4 (label) ppuDataTransfer::@return (nomodify void*) ppuDataTransfer::cpuData -(const nomodify void*) ppuDataTransfer::cpuData#0 cpuData = (void*)(const byte*) PALETTE +(nomodify void*) ppuDataTransfer::cpuData#2 cpuData zp[2]:7 (byte*) ppuDataTransfer::cpuSrc -(byte*) ppuDataTransfer::cpuSrc#1 cpuSrc zp[2]:9 1001.0 -(byte*) ppuDataTransfer::cpuSrc#2 cpuSrc zp[2]:9 750.75 +(byte*) ppuDataTransfer::cpuSrc#1 cpuSrc zp[2]:7 1.000000000000001E15 +(byte*) ppuDataTransfer::cpuSrc#2 cpuSrc zp[2]:7 7.52500000000001E14 +(byte*) ppuDataTransfer::cpuSrc#6 cpuSrc zp[2]:7 2.0000000000002E13 (word) ppuDataTransfer::i -(word) ppuDataTransfer::i#1 i zp[2]:7 2002.0 -(word) ppuDataTransfer::i#2 i zp[2]:7 600.5999999999999 +(word) ppuDataTransfer::i#1 i zp[2]:11 2.000000000000002E15 +(word) ppuDataTransfer::i#2 i zp[2]:11 6.000000000000005E14 (nomodify void*) ppuDataTransfer::ppuData -(const nomodify void*) ppuDataTransfer::ppuData#0 ppuData = (void*)(const nomodify byte*) PPU_PALETTE +(nomodify void*) ppuDataTransfer::ppuData#0 ppuData zp[2]:5 2.000000000002E12 (label) ppuDataTransfer::ppuDataPrepare1 +(byte~) ppuDataTransfer::ppuDataPrepare1_$0 reg byte a 2.0000000000002E13 +(byte~) ppuDataTransfer::ppuDataPrepare1_$1 reg byte a 2.0000000000002E13 (nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData +(nomodify void*) ppuDataTransfer::ppuDataPrepare1_ppuData#0 ppuDataPrepare1_ppuData zp[2]:5 7.000000000001E12 (label) ppuDataTransfer::ppuDataPut1 (byte) ppuDataTransfer::ppuDataPut1_val -(byte) ppuDataTransfer::ppuDataPut1_val#0 reg byte a 2002.0 +(byte) ppuDataTransfer::ppuDataPut1_val#0 reg byte a 2.000000000000002E15 (word) ppuDataTransfer::size -(const word) ppuDataTransfer::size#0 size = (byte) $20*(const byte) SIZEOF_BYTE +(word) ppuDataTransfer::size#3 size zp[2]:9 8.333333333333342E13 +(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) } +(byte) printf_buffer_number::sign +(byte) printf_format_number::justify_left +(byte) printf_format_number::min_length +(byte) printf_format_number::radix +(byte) printf_format_number::sign_always +(byte) printf_format_number::upper_case +(byte) printf_format_number::zero_padding +(byte) printf_format_string::justify_left +(byte) printf_format_string::min_length (byte()) readJoy1() -(byte~) readJoy1::$1 zp[1]:19 101.0 +(byte~) readJoy1::$1 zp[1]:28 101.0 (byte~) readJoy1::$2 reg byte a 202.0 (label) readJoy1::@1 (label) readJoy1::@2 @@ -235,6 +328,56 @@ i am nes (byte) readJoy1::joy#2 reg byte a 51.0 (byte) readJoy1::return (byte) readJoy1::return#2 reg byte a 4.0 +(const byte*) scroll_buffer[(number) $20] = { fill( $20, 0) } +(void()) uctoa((byte) uctoa::value , (byte*) uctoa::buffer , (byte) uctoa::radix) +(label) uctoa::@1 +(label) uctoa::@2 +(label) uctoa::@3 +(label) uctoa::@4 +(label) uctoa::@5 +(label) uctoa::@6 +(label) uctoa::@7 +(label) uctoa::@return +(byte*) uctoa::buffer +(byte*) uctoa::buffer#11 buffer zp[2]:15 33500.49999999999 +(byte*) uctoa::buffer#14 buffer zp[2]:15 150001.5 +(byte*) uctoa::buffer#3 buffer zp[2]:15 2002.0 +(byte*) uctoa::buffer#4 buffer zp[2]:15 200002.0 +(byte) uctoa::digit +(byte) uctoa::digit#1 digit zp[1]:17 200002.0 +(byte) uctoa::digit#2 digit zp[1]:17 30769.53846153846 +(byte) uctoa::digit_value +(byte) uctoa::digit_value#0 digit_value zp[1]:27 60000.600000000006 +(byte*) uctoa::digit_values +(byte) uctoa::max_digits +(const byte) uctoa::max_digits#2 max_digits = (byte) 2 +(byte) uctoa::radix +(byte) uctoa::started +(byte) uctoa::started#2 started zp[1]:18 60000.600000000006 +(byte) uctoa::started#4 started zp[1]:18 100001.0 +(byte) uctoa::value +(byte) uctoa::value#0 reg byte x 100001.0 +(byte) uctoa::value#1 reg byte x 551.0 +(byte) uctoa::value#2 reg byte x 67000.99999999999 +(byte) uctoa::value#6 reg byte x 150001.5 +(byte()) uctoa_append((byte*) uctoa_append::buffer , (byte) uctoa_append::value , (byte) uctoa_append::sub) +(label) uctoa_append::@1 +(label) uctoa_append::@2 +(label) uctoa_append::@3 +(label) uctoa_append::@return +(byte*) uctoa_append::buffer +(byte*) uctoa_append::buffer#0 buffer zp[2]:15 137500.25 +(byte) uctoa_append::digit +(byte) uctoa_append::digit#1 reg byte y 1.000000001E9 +(byte) uctoa_append::digit#2 reg byte y 1.0005000015E9 +(byte) uctoa_append::return +(byte) uctoa_append::return#0 reg byte x 200002.0 +(byte) uctoa_append::sub +(byte) uctoa_append::sub#0 sub zp[1]:27 3.333500005E8 +(byte) uctoa_append::value +(byte) uctoa_append::value#0 reg byte x 366667.3333333334 +(byte) uctoa_append::value#1 reg byte x 2.000000002E9 +(byte) uctoa_append::value#2 reg byte x 5.0018333416666675E8 interrupt(HARDWARE_STACK)(void()) vblank() (byte~) vblank::$1 reg byte a 4.0 (byte~) vblank::$3 reg byte a 4.0 @@ -254,45 +397,62 @@ interrupt(HARDWARE_STACK)(void()) vblank() (label) vblank::@return (byte) vblank::joy (byte) vblank::joy#0 reg byte x 0.7142857142857142 -(volatile byte) x_scroll loadstore zp[1]:15 1.1500000000000001 -(volatile byte) y_scroll loadstore zp[1]:16 1.4761904761904767 +(volatile byte) x_scroll loadstore zp[1]:21 1.1500000000000001 +(volatile byte) y_scroll loadstore zp[1]:22 1.4761904761904767 reg byte x [ main::initNES1_i#2 main::initNES1_i#1 ] -zp[1]:2 [ cscroll::y#2 cscroll::y#1 ] -zp[2]:3 [ cscroll::line1#6 cscroll::line1#2 cscroll::line1#1 ] -reg byte y [ cscroll::x#2 cscroll::x#1 ] -reg byte x [ ppuDataSet::val#2 ppuDataSet::val#0 ppuDataSet::val#1 ] -zp[2]:5 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataSet::ppuDataPrepare1_ppuData#0 ppuDataSet::ppuDataPrepare1_ppuData#2 ppuDataSet::ppuData#1 ppuDataSet::ppuData#0 ] +zp[1]:2 [ main::x#10 main::x#1 ] +zp[1]:3 [ main::y#10 main::y#1 ] +zp[1]:4 [ main::i#2 main::i#1 ] +reg byte x [ cputcxy::x#4 cputcxy::x#0 cputcxy::x#1 ] +reg byte a [ cputcxy::y#4 cputcxy::y#3 cputcxy::y#2 ] +reg byte y [ cputcxy::c#4 ] +reg byte x [ cputc::c#2 cputc::c#1 cputc::c#0 ] +reg byte x [ cscroll::y#2 cscroll::y#1 ] +zp[2]:5 [ ppuDataFetch::i#2 ppuDataFetch::i#1 ppuDataTransfer::ppuDataPrepare1_ppuData#0 ppuDataTransfer::ppuData#0 ] +zp[2]:7 [ ppuDataFetch::cpuDst#2 ppuDataFetch::cpuDst#1 ppuDataTransfer::cpuData#2 ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#6 ppuDataTransfer::cpuSrc#1 ] +zp[2]:9 [ ppuDataFill::ppuDataPrepare1_ppuData#0 ppuDataTransfer::size#3 ] +zp[2]:11 [ ppuDataFill::size#5 ppuDataTransfer::i#2 ppuDataTransfer::i#1 ] reg byte x [ ppuDataFill::val#10 ] -zp[2]:7 [ ppuDataTransfer::i#2 ppuDataTransfer::i#1 cputs::s#2 cputs::s#0 ] -zp[2]:9 [ ppuDataTransfer::cpuSrc#2 ppuDataTransfer::cpuSrc#1 cscroll::line2#6 cscroll::line2#2 cscroll::line2#1 ppuDataFill::i#2 ppuDataFill::i#1 ] +reg byte a [ gotoxy::y#5 gotoxy::y#4 gotoxy::y#2 gotoxy::y#3 ] +reg byte x [ gotoxy::x#5 gotoxy::x#4 gotoxy::x#2 gotoxy::x#3 ] +zp[2]:13 [ cputs::s#2 cputs::s#0 ] +reg byte x [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ] +zp[2]:15 [ uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 cscroll::line2#2 cscroll::line2#1 ] +reg byte x [ uctoa_append::value#2 uctoa_append::value#0 uctoa_append::value#1 ] +reg byte y [ uctoa_append::digit#2 uctoa_append::digit#1 ] reg byte x [ readJoy1::i#2 readJoy1::i#1 ] reg byte a [ readJoy1::joy#2 readJoy1::joy#1 ] -zp[1]:11 [ conio_cursor_x ] -zp[1]:12 [ conio_cursor_y ] -zp[2]:13 [ conio_line_text ] -zp[1]:15 [ x_scroll ] -zp[1]:16 [ y_scroll ] +zp[1]:17 [ conio_cursor_x uctoa::digit#2 uctoa::digit#1 ] +zp[1]:18 [ conio_cursor_y uctoa::started#2 uctoa::started#4 ] +zp[2]:19 [ conio_line_text gotoxy::$5 gotoxy::$6 gotoxy::line_offset#0 ] +zp[1]:21 [ x_scroll ] +zp[1]:22 [ y_scroll ] reg byte a [ main::initNES1_waitForVBlank1_$0 ] reg byte a [ main::initNES1_waitForVBlank2_$0 ] -reg byte a [ cputs::c#1 ] -reg byte x [ cputc::c#0 ] -zp[2]:17 [ ppuDataGet::ppuData#0 ppuDataFill::size#5 ] -reg byte a [ ppuDataGet::return#2 ] -reg byte x [ cscroll::ch#0 ] -reg byte a [ ppuDataSet::ppuDataPrepare1_$0 ] -reg byte a [ ppuDataSet::ppuDataPrepare1_$1 ] -reg byte a [ ppuDataGet::ppuDataPrepare1_$0 ] -reg byte a [ ppuDataGet::ppuDataPrepare1_$1 ] -reg byte a [ ppuDataGet::ppuDataRead1_return#0 ] +reg byte x [ cputsxy::x#0 ] +reg byte a [ cputsxy::y#0 ] +zp[2]:23 [ ppuDataSet::ppuData#0 cscroll::line1#2 cscroll::line1#1 ] +reg byte a [ ppuDataSet::val#0 ] +zp[2]:25 [ ppuDataFetch::ppuData#0 ppuDataFill::i#2 ppuDataFill::i#1 ] +reg byte a [ ppuDataTransfer::ppuDataPrepare1_$0 ] +reg byte a [ ppuDataTransfer::ppuDataPrepare1_$1 ] +reg byte a [ ppuDataTransfer::ppuDataPut1_val#0 ] +reg byte a [ ppuDataFetch::ppuDataPrepare1_$0 ] +reg byte a [ ppuDataFetch::ppuDataPrepare1_$1 ] +reg byte a [ ppuDataFetch::ppuDataRead1_return#0 ] reg byte a [ ppuDataFill::ppuDataPrepare1_$0 ] reg byte a [ ppuDataFill::ppuDataPrepare1_$1 ] -reg byte a [ ppuDataTransfer::ppuDataPut1_val#0 ] +reg byte x [ ppuDataSet::ppuDataPrepare1_$0 ] +reg byte x [ ppuDataSet::ppuDataPrepare1_$1 ] +reg byte a [ cputs::c#1 ] +zp[1]:27 [ uctoa::digit_value#0 uctoa_append::sub#0 ] +reg byte x [ uctoa_append::return#0 ] reg byte a [ readJoy1::return#2 ] reg byte x [ vblank::joy#0 ] reg byte a [ vblank::$1 ] reg byte a [ vblank::$3 ] reg byte a [ vblank::$5 ] reg byte a [ vblank::$7 ] -zp[1]:19 [ readJoy1::$1 ] +zp[1]:28 [ readJoy1::$1 ] reg byte a [ readJoy1::$2 ] diff --git a/src/test/ref/examples/nes/nes-demo.asm b/src/test/ref/examples/nes/nes-demo.asm index 65858f345..e6689e237 100644 --- a/src/test/ref/examples/nes/nes-demo.asm +++ b/src/test/ref/examples/nes/nes-demo.asm @@ -65,6 +65,8 @@ // $3000-$3eff $0f00 Mirrors of $2000-$2eff // $3f00-$3f1f $0020 Palette RAM indexes .label PPU_PALETTE = $3f00 + // PPU Status Register for reading in ASM + .label PPU_PPUSTATUS = $2002 // APU Frame Counter // generates low-frequency clocks for the channels and an optional 60 Hz interrupt. // https://wiki.nesdev.com/w/index.php/APU_Frame_Counter @@ -79,8 +81,6 @@ .label FR_COUNTER = $4017 // Pointer to the start of RAM memory .label MEMORY = 0 - // PPU Status Register for reading in ASM - .label PPU_PPUSTATUS = $2002 // NES Picture Processing Unit (PPU) .label PPU = $2000 // NES CPU and audion processing unit (APU) diff --git a/src/test/ref/examples/nes/nes-demo.log b/src/test/ref/examples/nes/nes-demo.log index c6ec9fa92..da5c3252b 100644 --- a/src/test/ref/examples/nes/nes-demo.log +++ b/src/test/ref/examples/nes/nes-demo.log @@ -63,6 +63,8 @@ Inlined call call ppuDataPrepare (nomodify void*) ppuDataFill::ppuData Inlined call call ppuDataPut (byte) ppuDataFill::val Inlined call call ppuDataPrepare (nomodify void*) ppuDataTransfer::ppuData Inlined call call ppuDataPut *((byte*) ppuDataTransfer::cpuSrc) +Inlined call call ppuDataPrepare (nomodify void*) ppuDataFetch::ppuData +Inlined call (byte~) ppuDataFetch::$2 ← call ppuDataRead Inlined call call ppuDataPrepare (nomodify void*) ppuDataPutTile::ppuData Inlined call call ppuDataPut *((byte*) ppuDataPutTile::tile + (number) 0) Inlined call call ppuDataPut *((byte*) ppuDataPutTile::tile + (number) 1) @@ -634,7 +636,7 @@ SYMBOL TABLE SSA (const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 = (byte*)(number) $23c0 (const nomodify byte*) PPU_NAME_TABLE_0 = (byte*)(number) $2000 (const nomodify byte*) PPU_PALETTE = (byte*)(number) $3f00 -(const to_volatile byte*) PPU_PPUSTATUS = (byte*)(number) $2002 +(const nomodify to_volatile byte*) PPU_PPUSTATUS = (byte*)(number) $2002 (byte) RICOH_2A03::DMC_FREQ (byte) RICOH_2A03::DMC_LEN (byte) RICOH_2A03::DMC_RAW @@ -1176,10 +1178,10 @@ Successful SSA optimization Pass2InlineCast Simplifying constant pointer cast (byte*) 8192 Simplifying constant pointer cast (byte*) 9152 Simplifying constant pointer cast (byte*) 16128 +Simplifying constant pointer cast (byte*) 8194 Simplifying constant pointer cast (byte*) 16407 Simplifying constant pointer cast (byte*) 0 Simplifying constant pointer cast (void()*) 0 -Simplifying constant pointer cast (byte*) 8194 Simplifying constant pointer cast (struct RICOH_2C02*) 8192 Simplifying constant pointer cast (struct RICOH_2A03*) 16384 Simplifying constant integer cast 1 @@ -2487,6 +2489,8 @@ Target platform is nes / MOS6502 // $3000-$3eff $0f00 Mirrors of $2000-$2eff // $3f00-$3f1f $0020 Palette RAM indexes .label PPU_PALETTE = $3f00 + // PPU Status Register for reading in ASM + .label PPU_PPUSTATUS = $2002 // APU Frame Counter // generates low-frequency clocks for the channels and an optional 60 Hz interrupt. // https://wiki.nesdev.com/w/index.php/APU_Frame_Counter @@ -2501,8 +2505,6 @@ Target platform is nes / MOS6502 .label FR_COUNTER = $4017 // Pointer to the start of RAM memory .label MEMORY = 0 - // PPU Status Register for reading in ASM - .label PPU_PPUSTATUS = $2002 // NES Picture Processing Unit (PPU) .label PPU = $2000 // NES CPU and audion processing unit (APU) @@ -3620,6 +3622,8 @@ ASSEMBLER BEFORE OPTIMIZATION // $3000-$3eff $0f00 Mirrors of $2000-$2eff // $3f00-$3f1f $0020 Palette RAM indexes .label PPU_PALETTE = $3f00 + // PPU Status Register for reading in ASM + .label PPU_PPUSTATUS = $2002 // APU Frame Counter // generates low-frequency clocks for the channels and an optional 60 Hz interrupt. // https://wiki.nesdev.com/w/index.php/APU_Frame_Counter @@ -3634,8 +3638,6 @@ ASSEMBLER BEFORE OPTIMIZATION .label FR_COUNTER = $4017 // Pointer to the start of RAM memory .label MEMORY = 0 - // PPU Status Register for reading in ASM - .label PPU_PPUSTATUS = $2002 // NES Picture Processing Unit (PPU) .label PPU = $2000 // NES CPU and audion processing unit (APU) @@ -4589,7 +4591,7 @@ FINAL SYMBOL TABLE (const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 = (byte*) 9152 (const nomodify byte*) PPU_NAME_TABLE_0 = (byte*) 8192 (const nomodify byte*) PPU_PALETTE = (byte*) 16128 -(const to_volatile byte*) PPU_PPUSTATUS = (byte*) 8194 +(const nomodify to_volatile byte*) PPU_PPUSTATUS = (byte*) 8194 (byte) RICOH_2A03::DMC_FREQ (byte) RICOH_2A03::DMC_LEN (byte) RICOH_2A03::DMC_RAW @@ -4894,6 +4896,8 @@ Score: 3905 // $3000-$3eff $0f00 Mirrors of $2000-$2eff // $3f00-$3f1f $0020 Palette RAM indexes .label PPU_PALETTE = $3f00 + // PPU Status Register for reading in ASM + .label PPU_PPUSTATUS = $2002 // APU Frame Counter // generates low-frequency clocks for the channels and an optional 60 Hz interrupt. // https://wiki.nesdev.com/w/index.php/APU_Frame_Counter @@ -4908,8 +4912,6 @@ Score: 3905 .label FR_COUNTER = $4017 // Pointer to the start of RAM memory .label MEMORY = 0 - // PPU Status Register for reading in ASM - .label PPU_PPUSTATUS = $2002 // NES Picture Processing Unit (PPU) .label PPU = $2000 // NES CPU and audion processing unit (APU) diff --git a/src/test/ref/examples/nes/nes-demo.sym b/src/test/ref/examples/nes/nes-demo.sym index f772543f6..3cc4397a0 100644 --- a/src/test/ref/examples/nes/nes-demo.sym +++ b/src/test/ref/examples/nes/nes-demo.sym @@ -25,7 +25,7 @@ (const nomodify byte*) PPU_ATTRIBUTE_TABLE_0 = (byte*) 9152 (const nomodify byte*) PPU_NAME_TABLE_0 = (byte*) 8192 (const nomodify byte*) PPU_PALETTE = (byte*) 16128 -(const to_volatile byte*) PPU_PPUSTATUS = (byte*) 8194 +(const nomodify to_volatile byte*) PPU_PPUSTATUS = (byte*) 8194 (byte) RICOH_2A03::DMC_FREQ (byte) RICOH_2A03::DMC_LEN (byte) RICOH_2A03::DMC_RAW