1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-26 18:29:54 +00:00

Merged FlightControl/CX16_VERA Commander X16 veralib updates and space demo.

This commit is contained in:
jespergravgaard 2021-02-02 00:14:47 +01:00
commit 41bb71511c
54 changed files with 38034 additions and 236 deletions

File diff suppressed because it is too large Load Diff

View File

@ -16,7 +16,11 @@ void cbm_k_ciout (unsigned char C);
unsigned char cbm_k_ckout (unsigned char FN);
void cbm_k_clall (void);
void cbm_k_clrch (void);
// Read a byte from the input channel
// return: next byte in buffer or 0 if buffer is empty.
unsigned char cbm_k_getin (void);
unsigned cbm_k_iobase (void);
void cbm_k_listen (unsigned char dev);
unsigned char cbm_k_readst (void);
@ -52,7 +56,6 @@ char* cbm_k_load(unsigned char flag, char* addr);
// return:
unsigned char cbm_k_save(char* start, char* end);
void cbm_k_settim (unsigned long timer);
void cbm_k_talk (unsigned char dev);
void cbm_k_tksa (unsigned char addr);

View File

@ -0,0 +1,15 @@
// Kernal SETNAM function
// SETNAM. Set file name parameters.
void setnam(char* filename);
// SETLFS. Set file parameters.
void setlfs(char device);
// LOAD. Load or verify file. (Must call SETLFS and SETNAM beforehands.)
// - verify: 0 = Load, 1-255 = Verify
// Returns a status, 0xff: Success other: Kernal Error Code
char load(char* address, char verify);
// GETIN. Read a byte from the input channel
// return: next byte in buffer or 0 if buffer is empty.
char getin();

View File

@ -262,5 +262,8 @@ struct VERA_SPRITE {
// - bits 0-3 Palette offset (if 4bpp Color index 1-15 is modified by adding 16 x palette offset)
char CTRL2;
};
// 4BPP sprite mode (add to VERA_SPRITE.ADDR to enable)
const unsigned int VERA_SPRITE_4BPP = 0x0000;
// 8BPP sprite mode (add to VERA_SPRITE.ADDR to enable)
const unsigned int VERA_SPRITE_8BPP = 0x8000;

View File

@ -37,11 +37,19 @@ void()** const KERNEL_IRQ = 0x0314;
// $0316 (RAM) BRK vector - The vector used when the KERNAL serves IRQ caused by a BRK
void()** const KERNEL_BRK = 0x0316;
// VRAM Address of the default screen
char * const DEFAULT_SCREEN = 0x0000;
// VRAM Bank (0/1) of the default screen
char * const DEFAULT_SCREEN_VBANK = 0;
// Load a file to memory
// Returns a status:
// - 0xff: Success
// - other: Kernal Error Code (https://commodore.ca/manuals/pdfs/commodore_error_messages.pdf)
char LoadFileBanked( char device, char* filename, dword address);
// Put a single byte into VRAM.
// Uses VERA DATA0
// - vbank: Which 64K VRAM bank to put data into (0/1)
@ -64,6 +72,13 @@ char vpeek(char vbank, char* vaddr);
// - num: The number of bytes to copy
void memcpy_to_vram(char vbank, void* vdest, void* src, unsigned int num );
// Copy block of banked internal memory (256 banks at A000-BFFF) to VERA VRAM.
// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination in VRAM.
// - vdest: dword of the destination address in VRAM
// - src: dword of source banked address in RAM. This address is a linair project of the banked memory of 512K to 2048K.
// - num: dword of the number of bytes to copy
void bnkcpy_vram_address(dword vdest, dword src, dword num );
// Copy block of memory (from VRAM to VRAM)
// Copies the values from the location pointed by src to the location pointed by dest.
// The method uses the VERA access ports 0 and 1 to copy data from and to in VRAM.
@ -76,10 +91,18 @@ void memcpy_to_vram(char vbank, void* vdest, void* src, unsigned int num );
// - num: The number of bytes to copy
void memcpy_in_vram(char dest_bank, void *dest, char dest_increment, char src_bank, void *src, char src_increment, unsigned int num );
// Set block of memory to a value in VRAM.
// Set block of memory in VRAM to a value .
// Sets num bytes to a value to the memory block pointed to by destination in VRAM.
// - vbank: Which 64K VRAM bank to put data into (0/1)
// - vdest: The destination address in VRAM
// - data: The value to set the vram with.
// - num: The number of bytes to set
void memset_vram(char vbank, void* vdest, char data, unsigned long num );
// Set block of memory in VRAM to a word value .
// Sets num words to a value to the memory block pointed to by destination in VRAM.
// - vbank: Which 64K VRAM bank to put data into (0/1)
// - vdest: The destination address in VRAM
// - data: The value to set the vram with.
// - num: The number of bytes to set
void memset_vram_word(char vbank, void* vdest, unsigned int data, unsigned long num );

View File

@ -0,0 +1,16 @@
// PEEK and POKE macros for those who want to write BASIC code in C
// Based on https://github.com/cc65/cc65/blob/master/include/peekpoke.h
// Read the absolute memory given by addr and return the value read.
#define PEEK(addr) (*(unsigned char*) (addr))
// Read the absolute memory given by addr and return the value read.
// The byte read from the higher address is the high byte of the return value.
#define PEEKW(addr) (*(unsigned int*) (addr))
// Writes the value val to the absolute memory address given by addr.
#define POKE(addr,val) (*(unsigned char*) (addr) = (val))
// Writes the value val to the absolute memory address given by addr.
// The low byte of val is written to the addr, the high byte is written to addr+1.
#define POKEW(addr,val) (*(unsigned int*) (addr) = (val))

View File

@ -0,0 +1,62 @@
#include <cx16-kernal.h>
#include <string.h>
// Kernal SETNAM function
// SETNAM. Set file name parameters.
void setnam(char* filename) {
char filename_len = (char)strlen(filename);
asm {
// Kernal SETNAM function
// SETNAM. Set file name parameters.
// Input: A = File name length; X/Y = Pointer to file name.
lda filename_len
ldx filename
ldy filename+1
jsr $ffbd
}
}
// SETLFS. Set file parameters.
void setlfs(char device) {
asm {
// SETLFS. Set file parameters.
// Input: A = Logical number; X = Device number; Y = Secondary address.
ldx device
lda #1
ldy #0
jsr $ffba
}
}
// LOAD. Load or verify file. (Must call SETLFS and SETNAM beforehands.)
// - verify: 0 = Load, 1-255 = Verify
//
// Returns a status, 0xff: Success other: Kernal Error Code
char load(char* address, char verify) {
char status;
asm {
//LOAD. Load or verify file. (Must call SETLFS and SETNAM beforehands.)
// Input: A: 0 = Load, 1-255 = Verify; X/Y = Load address (if secondary address = 0).
// Output: Carry: 0 = No errors, 1 = Error; A = KERNAL error code (if Carry = 1); X/Y = Address of last byte loaded/verified (if Carry = 0).
ldx address
ldy address+1
lda verify
jsr $ffd5
bcs error
lda #$ff
error:
sta status
}
return status;
}
// GETIN. Read a byte from the input channel
// return: next byte in buffer or 0 if buffer is empty.
char getin() {
char ch;
asm {
jsr $ffe4
sta ch
}
return ch;
}

View File

@ -3,6 +3,22 @@
// https://github.com/commanderx16/x16-docs/blob/master/Commander%20X16%20Programmer's%20Reference%20Guide.md
#include <cx16.h>
#include <cx16-kernal.h>
#include <peekpoke.h>
// Load a file to memory
// Returns a status:
// - 0xff: Success
// - other: Kernal Error Code (https://commodore.ca/manuals/pdfs/commodore_error_messages.pdf)
char LoadFileBanked( char device, char* filename, dword address) {
setnam(filename);
setlfs(device);
char bank = (byte)(((((word)<(>address)<<8)|>(<address))>>5)+((word)<(>address)<<3));
char* addr = ((<address)&0x1FFF); // stip off the top 3 bits, which are representing the bank of the word!
addr += 0xA000;
VIA1->PORT_A = (char)bank; // select the bank
return load(addr, 0);
}
// Put a single byte into VRAM.
// Uses VERA DATA0
@ -55,6 +71,39 @@ void memcpy_to_vram(char vbank, void* vdest, void* src, unsigned int num ) {
*VERA_DATA0 = *s;
}
// Copy block of banked internal memory (256 banks at A000-BFFF) to VERA VRAM.
// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination in VRAM.
// - vdest: dword of the destination address in VRAM
// - src: dword of source banked address in RAM. This address is a linair project of the banked memory of 512K to 2048K.
// - num: dword of the number of bytes to copy
void bnkcpy_vram_address(dword vdest, dword src, dword num ) {
// Select DATA0
*VERA_CTRL &= ~VERA_ADDRSEL;
// Set address
*VERA_ADDRX_L = <(<vdest);
*VERA_ADDRX_M = >(<vdest);
*VERA_ADDRX_H = <(>vdest);
*VERA_ADDRX_H |= VERA_INC_1;
dword beg = src;
dword end = src+num;
char bank = (byte)(((((word)<(>beg)<<8)|>(<beg))>>5)+((word)<(>beg)<<3));
char* addr = ((<beg)&0x1FFF); // stip off the top 3 bits, which are representing the bank of the word!
addr += 0xA000;
POKE(0x9f61, (byte)bank); // select the bank
for(dword pos=beg; pos<end; pos++) {
if(addr == 0xC000) {
POKE(0x9f61, (byte)++bank); // select the bank
addr = 0xA000;
}
*VERA_DATA0 = *addr;
addr++;
}
}
// Set block of memory to a value in VRAM.
// Sets num bytes to a value to the memory block pointed to by destination in VRAM.
// - vbank: Which 64K VRAM bank to put data into (0/1)
@ -73,6 +122,26 @@ void memset_vram(char vbank, void* vdest, char data, unsigned long num ) {
*VERA_DATA0 = data;
}
// Set block of memory in VRAM to a word value .
// Sets num words to a value to the memory block pointed to by destination in VRAM.
// - vbank: Which 64K VRAM bank to put data into (0/1)
// - vdest: The destination address in VRAM
// - data: The value to set the vram with.
// - num: The number of bytes to set
void memset_vram_word(char vbank, void* vdest, unsigned int data, unsigned long num ) {
// Select DATA0
*VERA_CTRL &= ~VERA_ADDRSEL;
// Set address
*VERA_ADDRX_L = <vdest;
*VERA_ADDRX_M = >vdest;
*VERA_ADDRX_H = VERA_INC_1 | vbank;
// Transfer the data
for(unsigned long i = 0; i<num; i++) {
*VERA_DATA0 = <data;
*VERA_DATA0 = >data;
}
}
// Copy block of memory (from VRAM to VRAM)
// Copies the values from the location pointed by src to the location pointed by dest.
// The method uses the VERA access ports 0 and 1 to copy data from and to in VRAM.

View File

@ -467,11 +467,6 @@ public class TestPrograms {
compileAndCompare("examples/nes/nes-demo.c");
}
//@Test
//public void testCx16Vera() throws IOException, URISyntaxException {
// compileAndCompare("examples/cx16/cx16-vera.c");
//}
@Test
public void testCx16VeralibTilemap8bpp() throws IOException, URISyntaxException {
compileAndCompare("examples/cx16/veralib/tilemap_8bpp_16_x_16.c");
@ -482,6 +477,16 @@ public class TestPrograms {
compileAndCompare("examples/cx16/veralib/bitmap_8bpp_320_x_240.c");
}
@Test
public void testCx16BankAddressing() throws IOException, URISyntaxException {
compileAndCompare("examples/cx16/cx16-bankaddressing.c");
}
@Test
public void testCx16LoadFileInBank() throws IOException, URISyntaxException {
compileAndCompare("examples/cx16/cx16-bankload.c");
}
@Test
public void testCx16VeraLayers() throws IOException, URISyntaxException {
compileAndCompare("examples/cx16/cx16-veralayers.c");

View File

@ -0,0 +1,36 @@
// Example program for the Commander X16
// Demonstrates some bank addressing calculations
#pragma target(cx16)
#include <cx16.h>
#include <6502.h>
#include <cx16-veralib.h>
#include <conio.h>
#include <printf.h>
#include <stdio.h>
void main() {
dword src = (dword)0x02000;
dword num = 64*64*2;
word inc = 0x0123;
for(dword src=0x0000;src<0x3F000;src+=num) {
dword calcbeg = src;
dword calcend = src+num+(-1);
byte bankbeg = (byte)(((((word)<(>calcbeg)<<8)|>(<calcbeg))>>5)+((word)<(>calcbeg)<<3));
byte bankend = (byte)(((((word)<(>calcend)<<8)|>(<calcend))>>5)+((word)<(>calcend)<<3));
const word borderbeg = 0xA000;
const word borderend = 0xA000+0x1FFF;
word beg = ((<calcbeg)&0x1FFF); // stip off the top 3 bits, which are representing the bank of the word!
word end = ((<calcend)&0x1FFF); // same for the end;
beg += borderbeg;
end += borderbeg;
printf("cbeg=%x, add=%x, cend=%x, bbeg=%x, bend=%x, beg=%x, end=%x\n", calcbeg, num, calcend, bankbeg, bankend, beg, end );
num+=inc;
}
}

View File

@ -0,0 +1,101 @@
// Commander X16 Load a file to a memory bank
#pragma target(cx16)
#pragma link("cx16-bankload.ld")
#include <cx16.h>
#include <cx16-kernal.h>
#include <cx16-veralib.h>
#include <cx16-kernal.h>
#include <6502.h>
#include <conio.h>
#include <printf.h>
#include <stdio.h>
#pragma data_seg(Sprite)
export char SPRITE_PIXELS[] = kickasm(resource "ship.png") {{
.var pic = LoadPicture("ship.png")
// palette: rgb->idx
.var palette = Hashtable()
// RGB value for each palette index
.var palList = List()
// Next palette index
.var nxt_idx = 0;
// Extract palette while outputting pixels as palete index values
.for (var y=0; y<64; y++) {
.for (var x=0;x<64; x++) {
// Find palette index (add if not known)
.var rgb = pic.getPixel(x,y);
.var idx = palette.get(rgb)
.if(idx==null) {
.eval idx = nxt_idx++;
.eval palette.put(rgb,idx);
.eval palList.add(rgb)
}
}
}
.if(nxt_idx>16) .error "Image has too many colours "+nxt_idx
.for(var i=0;i<16;i++) {
.var rgb = palList.get(i)
.var red = floor(rgb / [256*256])
.var green = floor(rgb/256) & 255
.var blue = rgb & 255
// bits 4-8: green, bits 0-3 blue
.byte green&$f0 | blue/16
// bits bits 0-3 red
.byte red/16
}
.for (var y=0; y<64; y++) {
.for (var x=0;x<64; x+=2) {
// Find palette index (add if not known)
.var rgb = pic.getPixel(x,y);
.var idx1 = palette.get(rgb)
.if(idx1==null) {
.printnow "unknown rgb value!"
}
// Find palette index (add if not known)
.eval rgb = pic.getPixel(x+1,y);
.var idx2 = palette.get(rgb)
.if(idx2==null) {
.printnow "unknown rgb value!"
}
.byte idx1*16+idx2;
}
}
}};
#pragma data_seg(Data)
void main() {
vera_layer_set_text_color_mode( 1, VERA_LAYER_CONFIG_16C );
screenlayer(1);
clrscr();
printf("\n\nsprite banked file load and display demo.\n");
const dword BANK_SPRITE = 0x12000; // Load in bank 9.
const dword VRAM_SPRITE = 0x10000; // Load in bank 9.
// Sprite attributes: 8bpp, in front, 64x64, address SPRITE_PIXELS_VRAM
struct VERA_SPRITE SPRITE_ATTR = { <(VRAM_SPRITE/32)|VERA_SPRITE_8BPP, 320-32, 240-32, 0x0c, 0xf1 };
char status = LoadFileBanked(8, "SPRITE", BANK_SPRITE );
bnkcpy_vram_address(VERA_PALETTE+32, BANK_SPRITE-2, 32);
bnkcpy_vram_address(VRAM_SPRITE, BANK_SPRITE+32-2, 64*32);
SPRITE_ATTR.ADDR = <(VRAM_SPRITE/32)|VERA_SPRITE_4BPP;
SPRITE_ATTR.X = 100;
SPRITE_ATTR.Y = 100;
memcpy_to_vram((char)>VERA_SPRITE_ATTR, <VERA_SPRITE_ATTR, &SPRITE_ATTR, sizeof(SPRITE_ATTR));
// Enable sprites
*VERA_CTRL &= ~VERA_DCSEL;
*VERA_DC_VIDEO |= VERA_SPRITES_ENABLE;
}

View File

@ -0,0 +1,10 @@
// Create a bunch of files
.file [name="%O", type="prg", segments="Program"]
.file [name="SPRITE", type="bin", segments="Sprite"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=%P]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(%E)
.segmentdef Sprite

View File

@ -0,0 +1,12 @@
#pragma target(cx16)
#include <cx16.h>
#include <cx16-kernal.h>
#include <stdio.h>
// Find the value of a keypress as returned by kernal getin()
void main() {
printf("\npress a key\n");
char test = 0;
while(test==0) test=getin();
printf("\nchar = %u\n", test);
}

View File

@ -8,7 +8,7 @@
#define NUM_SPRITES 32
// A 64*64 8bpp TUT sprite and palette
__align(0x1000) char SPRITE_PIXELS[64*64+0x200] = kickasm(resource "tut.png") {{
__align(0x0400) char SPRITE_PIXELS[64*64+0x200] = kickasm(resource "tut.png") {{
.var pic = LoadPicture("tut.png")
// palette: rgb->idx
.var palette = Hashtable()

View File

@ -6,14 +6,13 @@
#pragma target(cx16)
#include <cx16.h>
#include <cx16-veralib.h>
#include <cx16-kernal.h>
#include <stdio.h>
#include <cx16-bitmap.h>
#include <stdlib.h>
#include <division.h>
char fgetc();
void main() {
do {
@ -48,7 +47,7 @@ void main() {
byte menu = 0;
while(menu==0) {
menu = fgetc();
menu = getin();
}
textcolor(WHITE);
@ -78,25 +77,25 @@ void main() {
text_8_x_8_1BPP_16_color();
break;
case 66:
//text_8_x_8_1BPP_256_color();
text_8_x_8_1BPP_256_color();
break;
case 67:
tile_8_x_8_2BPP_4_color();
break;
case 68:
//tile_16_x_16_2BPP_4_color();
tile_16_x_16_2BPP_4_color();
break;
case 69:
//tile_8_x_8_4BPP_16_color();
tile_8_x_8_4BPP_16_color();
break;
case 70:
//tile_16_x_16_4BPP_16_color();
tile_16_x_16_4BPP_16_color();
break;
case 71:
//tile_8_x_8_8BPP_256_color();
tile_8_x_8_8BPP_256_color();
break;
case 72:
//tile_16_x_16_8BPP_256_color();
tile_16_x_16_8BPP_256_color();
break;
}
@ -113,17 +112,6 @@ void main() {
}
char fgetc() {
char * const GETIN = 0xFFE4;
char ch;
asm {
jsr GETIN
sta ch
}
return ch;
}
void tile_16_x_16_8BPP_256_color() {
vera_layer_mode_text( 1, 0x00000, 0x0F800, 128, 128, 8, 8, 256 );
@ -221,7 +209,7 @@ void tile_16_x_16_8BPP_256_color() {
vera_layer_show(0);
while(!fgetc());
while(!getin());
vera_tile_area(0, 0, 0, 0, 40, 30, 0, 0, 0);
@ -238,7 +226,7 @@ void tile_16_x_16_8BPP_256_color() {
row += 2;
}
while(!fgetc());
while(!getin());
memcpy_in_vram(0, 0xF800, VERA_INC_1, 1, 0xF000, VERA_INC_1, 256*8); // We copy the 128 character set of 8 bytes each.
}
@ -322,7 +310,7 @@ void tile_8_x_8_8BPP_256_color() {
printf("each offset aligns to multiples of 16 colors in the palette!.\n");
printf("however, the first color will always be transparent (black).\n");
while(!fgetc());
while(!getin());
memcpy_in_vram(0, 0xF800, VERA_INC_1, 1, 0xF000, VERA_INC_1, 256*8); // We copy the 128 character set of 8 bytes each.
}
@ -537,7 +525,7 @@ void tile_16_x_16_4BPP_16_color() {
printf("each offset aligns to multiples of 16 colors in the palette!.\n");
printf("however, the first color will always be transparent (black).\n");
while(!fgetc());
while(!getin());
}
@ -652,7 +640,7 @@ void tile_8_x_8_4BPP_16_color() {
printf("each offset aligns to multiples of 16 colors in the palette!.\n");
printf("however, the first color will always be transparent (black).\n");
while(!fgetc());
while(!getin());
}
@ -735,7 +723,7 @@ void tile_16_x_16_2BPP_4_color() {
printf("can be used per offset!\n");
printf("however, the first color will always be transparent (black).\n");
while(!fgetc());
while(!getin());
}
void tile_8_x_8_2BPP_4_color() {
@ -799,7 +787,7 @@ void tile_8_x_8_2BPP_4_color() {
printf("can be used per offset!\n");
printf("however, the first color will always be transparent (black).\n");
while(!fgetc());
while(!getin());
}
@ -828,7 +816,7 @@ void text_8_x_8_1BPP_256_color() {
printf("however, the first color will always be transparent (black).\n");
printf("in this mode, the background color cannot be set and is always transparent.\n");
while(!fgetc());
while(!getin());
}
void text_8_x_8_1BPP_16_color() {
@ -861,7 +849,7 @@ void text_8_x_8_1BPP_16_color() {
printf("however, the first color will always be transparent (black).\n");
printf("in this mode, the background color cannot be set and is always transparent.\n");
while(!fgetc());
while(!getin());
}
@ -900,7 +888,7 @@ void bitmap_320_x_240_1BPP() {
textcolor(YELLOW);
printf("press a key ...");
while(!fgetc()) {
while(!getin()) {
bitmap_line(modr16u(rand(),320,0), modr16u(rand(),320,0), modr16u(rand(),200,0), modr16u(rand(),200,0), rand()&1);
};
@ -917,7 +905,7 @@ void bitmap_320_x_240_1BPP() {
word x = 0;
byte color = 0;
while(!fgetc()) {
while(!getin()) {
bitmap_line(x, x, 0, 199, color);
color++;
if(color>1) color=0;
@ -964,7 +952,7 @@ void bitmap_640_x_480_1BPP() {
textcolor(YELLOW);
printf("press a key ...");
while(!fgetc()) {
while(!getin()) {
bitmap_line(modr16u(rand(),639,0), modr16u(rand(),639,0), modr16u(rand(),399,0), modr16u(rand(),399,0), rand()&1);
};
@ -981,7 +969,7 @@ void bitmap_640_x_480_1BPP() {
word x = 0;
byte color = 0;
while(!fgetc()) {
while(!getin()) {
bitmap_line(x, x, 0, 399, color);
color++;
if(color>1) color=0;
@ -1026,7 +1014,7 @@ void bitmap_320_x_240_2BPP() {
textcolor(YELLOW);
printf("press a key ...");
while(!fgetc()) {
while(!getin()) {
bitmap_line(modr16u(rand(),320,0), modr16u(rand(),320,0), modr16u(rand(),200,0), modr16u(rand(),200,0), rand()&3);
};
@ -1043,7 +1031,7 @@ void bitmap_320_x_240_2BPP() {
word x = 0;
byte color = 0;
while(!fgetc()) {
while(!getin()) {
bitmap_line(x, x, 0, 199, color);
color++;
if(color>3) color=0;
@ -1088,7 +1076,7 @@ void bitmap_640_x_480_2BPP() {
textcolor(YELLOW);
printf("press a key ...");
while(!fgetc()) {
while(!getin()) {
bitmap_line(modr16u(rand(),639,0), modr16u(rand(),639,0), modr16u(rand(),399,0), modr16u(rand(),399,0), rand()&3);
};
@ -1105,7 +1093,7 @@ void bitmap_640_x_480_2BPP() {
word x = 0;
byte color = 0;
while(!fgetc()) {
while(!getin()) {
bitmap_line(x, x, 0, 399, color);
color++;
if(color>3) color=0;
@ -1151,7 +1139,7 @@ void bitmap_320_x_240_4BPP() {
textcolor(YELLOW);
printf("press a key ...");
while(!fgetc()) {
while(!getin()) {
bitmap_line(modr16u(rand(),320,0), modr16u(rand(),320,0), modr16u(rand(),200,0), modr16u(rand(),200,0), rand()&15);
};
@ -1168,7 +1156,7 @@ void bitmap_320_x_240_4BPP() {
word x = 0;
byte color = 0;
while(!fgetc()) {
while(!getin()) {
bitmap_line(x, x, 0, 199, color);
color++;
if(color>15) color=0;
@ -1214,7 +1202,7 @@ void bitmap_320_x_240_8BPP() {
textcolor(YELLOW);
printf("press a key ...");
while(!fgetc()) {
while(!getin()) {
bitmap_line(modr16u(rand(),320,0), modr16u(rand(),320,0), modr16u(rand(),200,0), modr16u(rand(),200,0), rand()&255);
};
@ -1231,7 +1219,7 @@ void bitmap_320_x_240_8BPP() {
word x = 0;
byte color = 0;
while(!fgetc()) {
while(!getin()) {
bitmap_line(x, x, 0, 199, color);
color++;
x++;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 844 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 748 B

View File

@ -0,0 +1,382 @@
// Example program for the Commander X16
#pragma target(cx16)
#pragma link("spacedemo.ld")
#pragma data_seg(Data)
#include <cx16.h>
#include <cx16-kernal.h>
#include <cx16-veralib.h>
#include <6502.h>
#include <conio.h>
#include <printf.h>
#include <stdio.h>
const byte NUM_SPRITES = 12;
const byte NUM_TILES_SMALL = 4;
const byte NUM_TILES_LARGE = 4;
#pragma data_seg(Palettes)
export char* PALETTES;
#pragma data_seg(Sprites)
export char SPRITE_PIXELS[] = kickasm(resource "Ship_1/ship_1_360_1.png") {{
.var pic = LoadPicture("Ship_1/ship_1_360_1.png")
// palette: rgb->idx
.var palette = Hashtable()
// RGB value for each palette index
.var palList = List()
// Next palette index
.var nxt_idx = 0;
// Extract palette while outputting pixels as palete index values
.for (var y=0; y<64; y++) {
.for (var x=0;x<64; x++) {
// Find palette index (add if not known)
.var rgb = pic.getPixel(x,y);
.var idx = palette.get(rgb)
.if(idx==null) {
.eval idx = nxt_idx++;
.eval palette.put(rgb,idx);
.eval palList.add(rgb)
}
}
}
.if(nxt_idx>16) .error "Image has too many colours "+nxt_idx
.segment Palettes
.for(var i=0;i<16;i++) {
.var rgb = palList.get(i)
.var red = floor(rgb / [256*256])
.var green = floor(rgb/256) & 255
.var blue = rgb & 255
// bits 4-8: green, bits 0-3 blue
.byte green&$f0 | blue/16
// bits bits 0-3 red
.byte red/16
}
.segment Sprites
.for(var p=1;p<=NUM_SPRITES;p++) {
.var pic = LoadPicture("Ship_1/ship_1_360_" + p + ".png")
.for (var y=0; y<64; y++) {
.for (var x=0;x<64; x+=2) {
// Find palette index (add if not known)
.var rgb = pic.getPixel(x,y);
.var idx1 = palette.get(rgb)
.if(idx1==null) {
.printnow "unknown rgb value!"
}
// Find palette index (add if not known)
.eval rgb = pic.getPixel(x+1,y);
.var idx2 = palette.get(rgb)
.if(idx2==null) {
.printnow "unknown rgb value!"
}
.byte idx1*16+idx2;
}
}
}
}};
#pragma data_seg(TileS)
export char TILE_PIXELS_SMALL[] = kickasm(resource "Metal_1/frame_1.png") {{
// palette: rgb->idx
.var palette2 = Hashtable()
// RGB value for each palette index
.var palList2 = List()
// Next palette index
// Extract palette while outputting pixels as palete index values
.var nxt_idx2 = 0;
.for(var p=1;p<=NUM_TILES_SMALL;p++) {
.var pic = LoadPicture("Metal_1/frame_" + p + ".png")
.for (var y=0; y<32; y++) {
.for (var x=0;x<32; x++) {
// Find palette index (add if not known)
.var rgb = pic.getPixel(x,y);
.var idx = palette2.get(rgb)
.if(idx==null) {
.eval idx = nxt_idx2++;
.eval palette2.put(rgb,idx);
.eval palList2.add(rgb)
}
}
}
}
.if(nxt_idx2>16) .error "Image has too many colours "+nxt_idx2
.segment Palettes
.for(var i=0;i<16;i++) {
.var rgb = 16*256*256+16*256+16
.if(i<palList2.size())
.eval rgb = palList2.get(i)
.var red = floor(rgb / [256*256])
.var green = floor(rgb/256) & 255
.var blue = rgb & 255
// bits 4-8: green, bits 0-3 blue
.byte green&$f0 | blue/16
// bits bits 0-3 red
.byte red/16
.printnow "tile small: rgb = " + rgb + ", i = " + i
}
.segment TileS
.var count = 0
.for(var p=1;p<=NUM_TILES_SMALL;p++) {
.var pic = LoadPicture("Metal_1/frame_" + p + ".png")
.for(var j=0; j<32; j+=16) {
.for(var i=0; i<32; i+=16) {
.for (var y=j; y<j+16; y++) {
.for (var x=i; x<i+16; x+=2) {
// .printnow "j="+j+",y="+y+",i="+i+",x="+x
// Find palette index (add if not known)
.var rgb = pic.getPixel(x,y);
.var idx1 = palette2.get(rgb)
.if(idx1==null) {
.error "unknown rgb value!"
}
// Find palette index (add if not known)
.eval rgb = pic.getPixel(x+1,y);
.var idx2 = palette2.get(rgb)
.if(idx2==null) {
.error "unknown rgb value!"
}
.byte idx1*16+idx2;
.eval count++;
}
}
}
}
}
.printnow "small count = " + count
}};
#pragma data_seg(TileB)
export char TILE_PIXELS_LARGE[] = kickasm(resource "Metal_1/metal_1.png") {{
.var pic3 = LoadPicture("Metal_1/metal_1.png")
// palette: rgb->idx
.var palette3 = Hashtable()
// RGB value for each palette index
.var palList3 = List()
// Next palette index
.var nxt_idx3 = 0;
// Extract palette while outputting pixels as palete index values
.for (var y=0; y<64; y++) {
.for (var x=0;x<64; x++) {
// Find palette index (add if not known)
.var rgb = pic3.getPixel(x,y);
.var idx = palette3.get(rgb)
.if(idx==null) {
.eval idx = nxt_idx3++;
.eval palette3.put(rgb,idx);
.eval palList3.add(rgb)
}
}
}
.if(nxt_idx3>16) .error "Image has too many colours "+nxt_idx3
.segment Palettes
.for(var i=0;i<16;i++) {
.var rgb = 0
.if(i<palList3.size())
.eval rgb = palList3.get(i)
.var red = floor(rgb / [256*256])
.var green = floor(rgb/256) & 255
.var blue = rgb & 255
// bits 4-8: green, bits 0-3 blue
.byte green&$f0 | blue/16
// bits bits 0-3 red
.byte red/16
// .printnow "tile large: rgb = " + rgb + ", i = " + i
}
.segment TileB
.eval count = 0
.for(var p=1;p<=NUM_TILES_LARGE;p++) {
.var pic = LoadPicture("Metal_1/metal_" + p + ".png")
.for(var j=0; j<64; j+=16) {
.for(var i=0; i<64; i+=16) {
.for (var y=j; y<j+16; y++) {
.for (var x=i; x<i+16; x+=2) {
// Find palette index (add if not known)
.var rgb = pic.getPixel(x,y);
.var idx1 = palette3.get(rgb)
.if(idx1==null) {
.error "unknown rgb value!"
}
// Find palette index (add if not known)
.eval rgb = pic.getPixel(x+1,y);
.var idx2 = palette3.get(rgb)
.if(idx2==null) {
.error "unknown rgb value!"
}
.byte idx1*16+idx2;
.eval count++;
}
}
}
}
}
.printnow "count = " + count
}};
#pragma data_seg(Data)
word sprites[NUM_SPRITES];
// Addressed used for graphics in main banked memory.
const dword BANK_SPRITES = 0x02000;
const dword BANK_TILES_SMALL = 0x14000;
const dword BANK_TILES_LARGE = 0x16000;
const dword BANK_PALETTE = 0x18000;
// Addresses used to store graphics in VERA VRAM.
const dword VRAM_SPRITES = 0x00000;
const dword VRAM_TILES_SMALL = 0x14000;
const dword VRAM_TILES_LARGE = 0x14800;
const dword VRAM_PALETTE = 0x18000;
word sprite_offset = <(VRAM_SPRITES/32)|VERA_SPRITE_4BPP;
// Sprite attributes: 8bpp, in front, 64x64, address SPRITE_PIXELS_VRAM
struct VERA_SPRITE SPRITE_ATTR = { <(VRAM_SPRITES/32)|VERA_SPRITE_8BPP, 320-32, 240-32, 0x0c, 0xf1 };
void main() {
memcpy_in_vram(1, 0xF000, VERA_INC_1, 0, 0xF800, VERA_INC_1, 256*8); // We copy the 128 character set of 8 bytes each.
vera_layer_mode_tile(1, (dword)0x1A000, (dword)0x1F000, 128, 64, 8, 8, 1);
screenlayer(1);
textcolor(WHITE);
bgcolor(BLACK);
clrscr();
// Loading the graphics in main banked memory.
char status = LoadFileBanked(8, "SPRITES", BANK_SPRITES);
status = LoadFileBanked(8, "TILES", BANK_TILES_SMALL);
status = LoadFileBanked(8, "TILEB", BANK_TILES_LARGE);
// Load the palette in main banked memory.
status = LoadFileBanked(8, "PALETTES", BANK_PALETTE);
// Copy graphics to the VERA VRAM.
bnkcpy_vram_address(VRAM_SPRITES, BANK_SPRITES-2, (dword)64*64*NUM_SPRITES/2);
bnkcpy_vram_address(VRAM_TILES_SMALL, BANK_TILES_SMALL-2, (dword)32*32*(NUM_TILES_SMALL)/2);
bnkcpy_vram_address(VRAM_TILES_LARGE, BANK_TILES_LARGE-2, (dword)64*64*(NUM_TILES_LARGE)/2);
// Load the palette in VERA palette registers, but keep the first 16 colors untouched.
bnkcpy_vram_address(VERA_PALETTE+32, BANK_PALETTE-2, (dword)32*3);
// Now we activate the tile mode.
vera_layer_mode_tile(0, (dword)0x10000, VRAM_TILES_SMALL, 128, 64, 16, 16, 4);
POKE(0x9f61, 0); // let's put back bank 0.
vera_vram_address0(0x10000,VERA_INC_1);
for(byte r=0;r<42;r+=12) {
for(byte j=0;j<16;j+=8) {
for(byte i=0;i<4;i+=2) {
for(byte c=0;c<128;c+=4) {
*VERA_DATA0 = 0+i+j;
*VERA_DATA0 = 0x20;
*VERA_DATA0 = 1+i+j;
*VERA_DATA0 = 0x20;
*VERA_DATA0 = 4+i+j;
*VERA_DATA0 = 0x20;
*VERA_DATA0 = 5+i+j;
*VERA_DATA0 = 0x20;
}
}
}
for(byte j=0;j<64;j+=32) {
for(byte i=0;i<16;i+=4) {
for(byte c=0;c<128;c+=8) {
*VERA_DATA0 = 16+i+j;
*VERA_DATA0 = 0x30;
*VERA_DATA0 = 17+i+j;
*VERA_DATA0 = 0x30;
*VERA_DATA0 = 18+i+j;
*VERA_DATA0 = 0x30;
*VERA_DATA0 = 19+i+j;
*VERA_DATA0 = 0x30;
*VERA_DATA0 = 32+i+j;
*VERA_DATA0 = 0x30;
*VERA_DATA0 = 33+i+j;
*VERA_DATA0 = 0x30;
*VERA_DATA0 = 34+i+j;
*VERA_DATA0 = 0x30;
*VERA_DATA0 = 35+i+j;
*VERA_DATA0 = 0x30;
}
}
}
}
vera_layer_show(0);
// Copy sprite palette to VRAM
// Copy 8* sprite attributes to VRAM
char* vram_sprite_attr = <VERA_SPRITE_ATTR;
for(char s=0;s<NUM_SPRITES;s++) {
sprites[s] = sprite_offset;
SPRITE_ATTR.ADDR = sprite_offset;
SPRITE_ATTR.X += 68;
SPRITE_ATTR.Y = 100;
memcpy_to_vram((char)>VERA_SPRITE_ATTR, vram_sprite_attr, &SPRITE_ATTR, sizeof(SPRITE_ATTR));
vram_sprite_attr += sizeof(SPRITE_ATTR);
sprite_offset += 64;
}
// Enable sprites
*VERA_CTRL &= ~VERA_DCSEL;
*VERA_DC_VIDEO |= VERA_SPRITES_ENABLE;
// Enable VSYNC IRQ (also set line bit 8 to 0)
SEI();
*KERNEL_IRQ = &irq_vsync;
*VERA_IEN = VERA_VSYNC;
CLI();
while(!getin());
}
volatile byte i = 0;
volatile byte a = 4;
volatile word vscroll = 0;
volatile word scroll_action = 2;
// VSYNC Interrupt Routine
__interrupt(rom_sys_cx16) void irq_vsync() {
// Move the sprite around
a--;
if(a==0) {
a=4;
const char vram_sprite_attr_bank = (char)>VERA_SPRITE_ATTR;
char *vram_sprite_attr = <VERA_SPRITE_ATTR;
unsigned int i_x = 0;
unsigned int i_y = 0;
for(word s=0;s<NUM_SPRITES;s++) {
word x = s+i;
if(x>=NUM_SPRITES) {
x-=NUM_SPRITES;
}
SPRITE_ATTR.ADDR = sprites[x];
SPRITE_ATTR.X = (word)40+((word)(s&03)<<7);
SPRITE_ATTR.Y = (word)100+((word)(s>>2)<<7);
// Copy sprite positions to VRAM (the 4 relevant bytes in VERA_SPRITE_ATTR)
memcpy_to_vram(vram_sprite_attr_bank, vram_sprite_attr, &SPRITE_ATTR, 6);
vram_sprite_attr += sizeof(SPRITE_ATTR);
}
i++;
if(i>=NUM_SPRITES) i=0;
}
if(scroll_action--) {
scroll_action = 2;
vscroll++;
if(vscroll>(32+64)*2-1) vscroll=0;
vera_layer_set_vertical_scroll(0,vscroll);
}
// Reset the VSYNC interrupt
*VERA_ISR = VERA_VSYNC;
}

View File

@ -0,0 +1,16 @@
// Create a bunch of files
.file [name="%O", type="prg", segments="Program"]
.file [name="SPRITES", type="bin", segments="Sprites"]
.file [name="TILES", type="bin", segments="TileS"]
.file [name="TILEB", type="bin", segments="TileB"]
.file [name="PALETTES", type="bin", segments="Palettes"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=%P]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(%E)
.segmentdef Sprites
.segmentdef TileS
.segmentdef TileB
.segmentdef Palettes

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,904 @@
void __start()
__start: scope:[__start] from
[0] phi()
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] conio_screen_width = 0
[2] conio_screen_height = 0
[3] conio_screen_layer = 1
[4] conio_width = 0
[5] conio_height = 0
[6] conio_rowshift = 0
[7] conio_rowskip = 0
[8] call conio_x16_init
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[9] phi()
[10] call main
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[11] return
to:@return
void conio_x16_init()
conio_x16_init: scope:[conio_x16_init] from __start::__init1
[12] conio_x16_init::line#0 = *conio_x16_init::BASIC_CURSOR_LINE
[13] call vera_layer_mode_text
to:conio_x16_init::@3
conio_x16_init::@3: scope:[conio_x16_init] from conio_x16_init
[14] phi()
[15] call screensize
to:conio_x16_init::@4
conio_x16_init::@4: scope:[conio_x16_init] from conio_x16_init::@3
[16] phi()
[17] call screenlayer
to:conio_x16_init::@5
conio_x16_init::@5: scope:[conio_x16_init] from conio_x16_init::@4
[18] phi()
[19] call vera_layer_set_textcolor
to:conio_x16_init::@6
conio_x16_init::@6: scope:[conio_x16_init] from conio_x16_init::@5
[20] phi()
[21] call vera_layer_set_backcolor
to:conio_x16_init::@7
conio_x16_init::@7: scope:[conio_x16_init] from conio_x16_init::@6
[22] phi()
[23] call vera_layer_set_mapbase
to:conio_x16_init::@8
conio_x16_init::@8: scope:[conio_x16_init] from conio_x16_init::@7
[24] phi()
[25] call vera_layer_set_mapbase
to:conio_x16_init::@9
conio_x16_init::@9: scope:[conio_x16_init] from conio_x16_init::@8
[26] if(conio_x16_init::line#0<conio_screen_height) goto conio_x16_init::@1
to:conio_x16_init::@2
conio_x16_init::@2: scope:[conio_x16_init] from conio_x16_init::@9
[27] conio_x16_init::line#1 = conio_screen_height - 1
to:conio_x16_init::@1
conio_x16_init::@1: scope:[conio_x16_init] from conio_x16_init::@2 conio_x16_init::@9
[28] conio_x16_init::line#3 = phi( conio_x16_init::@2/conio_x16_init::line#1, conio_x16_init::@9/conio_x16_init::line#0 )
[29] gotoxy::y#0 = conio_x16_init::line#3
[30] call gotoxy
to:conio_x16_init::@return
conio_x16_init::@return: scope:[conio_x16_init] from conio_x16_init::@1
[31] return
to:@return
void main()
main: scope:[main] from __start::@1
[32] phi()
to:main::@1
main::@1: scope:[main] from main main::@17
[33] main::num#10 = phi( main/(dword)$40*$40*2, main::@17/main::num#1 )
[33] main::src1#10 = phi( main/0, main::@17/main::src1#1 )
[34] if(main::src1#10<$3f000) goto main::@2
to:main::@return
main::@return: scope:[main] from main::@1
[35] return
to:@return
main::@2: scope:[main] from main::@1
[36] main::$1 = main::src1#10 + main::num#10
[37] main::calcend#0 = main::$1 + -1
[38] main::$3 = > main::src1#10
[39] main::$4 = main::$3 << 8
[40] main::$5 = < main::$4
[41] main::$6 = < main::src1#10
[42] main::$7 = > main::$6
[43] main::$30 = (word)main::$5
[44] main::$8 = main::$30 | main::$7
[45] main::$9 = main::$8 >> 5
[46] main::$10 = > main::src1#10
[47] main::$11 = main::$10 << 3
[48] main::$12 = < main::$11
[49] main::$31 = (word)main::$12
[50] main::$13 = main::$9 + main::$31
[51] main::bankbeg#0 = (byte)main::$13
[52] main::$14 = > main::calcend#0
[53] main::$15 = main::$14 << 8
[54] main::$16 = < main::$15
[55] main::$17 = < main::calcend#0
[56] main::$18 = > main::$17
[57] main::$32 = (word)main::$16
[58] main::$19 = main::$32 | main::$18
[59] main::$20 = main::$19 >> 5
[60] main::$21 = > main::calcend#0
[61] main::$22 = main::$21 << 3
[62] main::$23 = < main::$22
[63] main::$33 = (word)main::$23
[64] main::$24 = main::$20 + main::$33
[65] main::bankend#0 = (byte)main::$24
[66] main::$25 = < main::src1#10
[67] main::beg#0 = main::$25 & $1fff
[68] main::$27 = < main::calcend#0
[69] main::end#0 = main::$27 & $1fff
[70] main::beg#1 = main::beg#0 + main::borderbeg
[71] main::end#1 = main::end#0 + main::borderbeg
[72] call cputs
to:main::@3
main::@3: scope:[main] from main::@2
[73] printf_ulong::uvalue#0 = main::src1#10
[74] call printf_ulong
to:main::@4
main::@4: scope:[main] from main::@3
[75] phi()
[76] call cputs
to:main::@5
main::@5: scope:[main] from main::@4
[77] printf_ulong::uvalue#1 = main::num#10
[78] call printf_ulong
to:main::@6
main::@6: scope:[main] from main::@5
[79] phi()
[80] call cputs
to:main::@7
main::@7: scope:[main] from main::@6
[81] printf_ulong::uvalue#2 = main::calcend#0
[82] call printf_ulong
to:main::@8
main::@8: scope:[main] from main::@7
[83] phi()
[84] call cputs
to:main::@9
main::@9: scope:[main] from main::@8
[85] printf_uchar::uvalue#0 = main::bankbeg#0
[86] call printf_uchar
to:main::@10
main::@10: scope:[main] from main::@9
[87] phi()
[88] call cputs
to:main::@11
main::@11: scope:[main] from main::@10
[89] printf_uchar::uvalue#1 = main::bankend#0
[90] call printf_uchar
to:main::@12
main::@12: scope:[main] from main::@11
[91] phi()
[92] call cputs
to:main::@13
main::@13: scope:[main] from main::@12
[93] printf_uint::uvalue#0 = main::beg#1
[94] call printf_uint
to:main::@14
main::@14: scope:[main] from main::@13
[95] phi()
[96] call cputs
to:main::@15
main::@15: scope:[main] from main::@14
[97] printf_uint::uvalue#1 = main::end#1
[98] call printf_uint
to:main::@16
main::@16: scope:[main] from main::@15
[99] phi()
[100] call cputs
to:main::@17
main::@17: scope:[main] from main::@16
[101] main::num#1 = main::num#10 + main::inc
[102] main::src1#1 = main::src1#10 + main::num#1
to:main::@1
void vera_layer_mode_text(byte vera_layer_mode_text::layer , dword vera_layer_mode_text::mapbase_address , dword vera_layer_mode_text::tilebase_address , word vera_layer_mode_text::mapwidth , word vera_layer_mode_text::mapheight , byte vera_layer_mode_text::tilewidth , byte vera_layer_mode_text::tileheight , word vera_layer_mode_text::color_mode)
vera_layer_mode_text: scope:[vera_layer_mode_text] from conio_x16_init
[103] phi()
[104] call vera_layer_mode_tile
to:vera_layer_mode_text::@1
vera_layer_mode_text::@1: scope:[vera_layer_mode_text] from vera_layer_mode_text
[105] phi()
[106] call vera_layer_set_text_color_mode
to:vera_layer_mode_text::@return
vera_layer_mode_text::@return: scope:[vera_layer_mode_text] from vera_layer_mode_text::@1
[107] return
to:@return
void screensize(byte* screensize::x , byte* screensize::y)
screensize: scope:[screensize] from conio_x16_init::@3
[108] screensize::hscale#0 = *VERA_DC_HSCALE >> 7
[109] screensize::$1 = $28 << screensize::hscale#0
[110] *screensize::x#0 = screensize::$1
[111] screensize::vscale#0 = *VERA_DC_VSCALE >> 7
[112] screensize::$3 = $1e << screensize::vscale#0
[113] *screensize::y#0 = screensize::$3
to:screensize::@return
screensize::@return: scope:[screensize] from screensize
[114] return
to:@return
void screenlayer(byte screenlayer::layer)
screenlayer: scope:[screenlayer] from conio_x16_init::@4
[115] conio_screen_layer = screenlayer::layer#0
[116] vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer
[117] call vera_layer_get_mapbase_bank
[118] vera_layer_get_mapbase_bank::return#2 = vera_layer_get_mapbase_bank::return#0
to:screenlayer::@3
screenlayer::@3: scope:[screenlayer] from screenlayer
[119] CONIO_SCREEN_BANK#10 = vera_layer_get_mapbase_bank::return#2
[120] vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer
[121] call vera_layer_get_mapbase_offset
[122] vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#0
to:screenlayer::@4
screenlayer::@4: scope:[screenlayer] from screenlayer::@3
[123] CONIO_SCREEN_TEXT#101 = vera_layer_get_mapbase_offset::return#2
[124] screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer
to:screenlayer::vera_layer_get_width1
screenlayer::vera_layer_get_width1: scope:[screenlayer] from screenlayer::@4
[125] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 << 1
[126] screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2]
[127] screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK
[128] screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4
[129] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 << 1
[130] screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3]
to:screenlayer::vera_layer_get_width1_@return
screenlayer::vera_layer_get_width1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_width1
[131] screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#0
to:screenlayer::@1
screenlayer::@1: scope:[screenlayer] from screenlayer::vera_layer_get_width1_@return
[132] screenlayer::$2 = screenlayer::vera_layer_get_width1_return#1
[133] conio_width = screenlayer::$2
[134] vera_layer_get_rowshift::layer#0 = conio_screen_layer
[135] call vera_layer_get_rowshift
[136] vera_layer_get_rowshift::return#2 = vera_layer_get_rowshift::return#0
to:screenlayer::@5
screenlayer::@5: scope:[screenlayer] from screenlayer::@1
[137] screenlayer::$3 = vera_layer_get_rowshift::return#2
[138] conio_rowshift = screenlayer::$3
[139] vera_layer_get_rowskip::layer#0 = conio_screen_layer
[140] call vera_layer_get_rowskip
[141] vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#0
to:screenlayer::@6
screenlayer::@6: scope:[screenlayer] from screenlayer::@5
[142] screenlayer::$4 = vera_layer_get_rowskip::return#2
[143] conio_rowskip = screenlayer::$4
[144] screenlayer::vera_layer_get_height1_layer#0 = conio_screen_layer
to:screenlayer::vera_layer_get_height1
screenlayer::vera_layer_get_height1: scope:[screenlayer] from screenlayer::@6
[145] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 << 1
[146] screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2]
[147] screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK
[148] screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6
[149] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 << 1
[150] screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3]
to:screenlayer::vera_layer_get_height1_@return
screenlayer::vera_layer_get_height1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_height1
[151] screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#0
to:screenlayer::@2
screenlayer::@2: scope:[screenlayer] from screenlayer::vera_layer_get_height1_@return
[152] screenlayer::$5 = screenlayer::vera_layer_get_height1_return#1
[153] conio_height = screenlayer::$5
to:screenlayer::@return
screenlayer::@return: scope:[screenlayer] from screenlayer::@2
[154] return
to:@return
byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color)
vera_layer_set_textcolor: scope:[vera_layer_set_textcolor] from conio_x16_init::@5
[155] *(vera_layer_textcolor+vera_layer_set_textcolor::layer#0) = WHITE
to:vera_layer_set_textcolor::@return
vera_layer_set_textcolor::@return: scope:[vera_layer_set_textcolor] from vera_layer_set_textcolor
[156] return
to:@return
byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color)
vera_layer_set_backcolor: scope:[vera_layer_set_backcolor] from conio_x16_init::@6
[157] *(vera_layer_backcolor+vera_layer_set_backcolor::layer#0) = BLUE
to:vera_layer_set_backcolor::@return
vera_layer_set_backcolor::@return: scope:[vera_layer_set_backcolor] from vera_layer_set_backcolor
[158] return
to:@return
void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase)
vera_layer_set_mapbase: scope:[vera_layer_set_mapbase] from conio_x16_init::@7 conio_x16_init::@8 vera_layer_mode_tile::@4
[159] vera_layer_set_mapbase::mapbase#3 = phi( conio_x16_init::@7/$20, conio_x16_init::@8/0, vera_layer_mode_tile::@4/vera_layer_mode_tile::mapbase#0 )
[159] vera_layer_set_mapbase::layer#3 = phi( conio_x16_init::@7/0, conio_x16_init::@8/1, vera_layer_mode_tile::@4/vera_layer_mode_text::layer#0 )
[160] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 << 1
[161] vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0]
[162] *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3
to:vera_layer_set_mapbase::@return
vera_layer_set_mapbase::@return: scope:[vera_layer_set_mapbase] from vera_layer_set_mapbase
[163] return
to:@return
void gotoxy(byte gotoxy::x , byte gotoxy::y)
gotoxy: scope:[gotoxy] from conio_x16_init::@1 cscroll::@5
[164] gotoxy::y#3 = phi( conio_x16_init::@1/gotoxy::y#0, cscroll::@5/gotoxy::y#2 )
[165] if(gotoxy::y#3<=conio_screen_height) goto gotoxy::@4
to:gotoxy::@1
gotoxy::@4: scope:[gotoxy] from gotoxy
[166] phi()
to:gotoxy::@1
gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@4
[167] gotoxy::y#4 = phi( gotoxy::@4/gotoxy::y#3, gotoxy/0 )
[168] if(0<conio_screen_width) goto gotoxy::@2
to:gotoxy::@3
gotoxy::@3: scope:[gotoxy] from gotoxy::@1
[169] phi()
to:gotoxy::@2
gotoxy::@2: scope:[gotoxy] from gotoxy::@1 gotoxy::@3
[170] conio_cursor_x[conio_screen_layer] = 0
[171] conio_cursor_y[conio_screen_layer] = gotoxy::y#4
[172] gotoxy::$6 = (word)gotoxy::y#4
[173] gotoxy::line_offset#0 = gotoxy::$6 << conio_rowshift
[174] gotoxy::$5 = conio_screen_layer << 1
[175] conio_line_text[gotoxy::$5] = gotoxy::line_offset#0
to:gotoxy::@return
gotoxy::@return: scope:[gotoxy] from gotoxy::@2
[176] return
to:@return
void cputs(to_nomodify byte* cputs::s)
cputs: scope:[cputs] from main::@10 main::@12 main::@14 main::@16 main::@2 main::@4 main::@6 main::@8 printf_number_buffer::@2
[177] cputs::s#11 = phi( main::@10/main::s4, main::@12/main::s5, main::@14/main::s6, main::@16/main::s7, main::@2/main::s, main::@4/main::s1, main::@6/main::s2, main::@8/main::s3, printf_number_buffer::@2/(byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
to:cputs::@1
cputs::@1: scope:[cputs] from cputs cputs::@2
[178] cputs::s#10 = phi( cputs/cputs::s#11, cputs::@2/cputs::s#0 )
[179] cputs::c#1 = *cputs::s#10
[180] cputs::s#0 = ++ cputs::s#10
[181] if(0!=cputs::c#1) goto cputs::@2
to:cputs::@return
cputs::@return: scope:[cputs] from cputs::@1
[182] return
to:@return
cputs::@2: scope:[cputs] from cputs::@1
[183] cputc::c#0 = cputs::c#1
[184] call cputc
to:cputs::@1
void printf_ulong(dword printf_ulong::uvalue , byte printf_ulong::format_min_length , byte printf_ulong::format_justify_left , byte printf_ulong::format_sign_always , byte printf_ulong::format_zero_padding , byte printf_ulong::format_upper_case , byte printf_ulong::format_radix)
printf_ulong: scope:[printf_ulong] from main::@3 main::@5 main::@7
[185] printf_ulong::uvalue#3 = phi( main::@3/printf_ulong::uvalue#0, main::@5/printf_ulong::uvalue#1, main::@7/printf_ulong::uvalue#2 )
to:printf_ulong::@1
printf_ulong::@1: scope:[printf_ulong] from printf_ulong
[186] *((byte*)&printf_buffer) = 0
[187] ultoa::value#1 = printf_ulong::uvalue#3
[188] call ultoa
to:printf_ulong::@2
printf_ulong::@2: scope:[printf_ulong] from printf_ulong::@1
[189] printf_number_buffer::buffer_sign#0 = *((byte*)&printf_buffer)
[190] call printf_number_buffer
to:printf_ulong::@return
printf_ulong::@return: scope:[printf_ulong] from printf_ulong::@2
[191] return
to:@return
void printf_uchar(byte printf_uchar::uvalue , byte printf_uchar::format_min_length , byte printf_uchar::format_justify_left , byte printf_uchar::format_sign_always , byte printf_uchar::format_zero_padding , byte printf_uchar::format_upper_case , byte printf_uchar::format_radix)
printf_uchar: scope:[printf_uchar] from main::@11 main::@9
[192] printf_uchar::uvalue#2 = phi( main::@11/printf_uchar::uvalue#1, main::@9/printf_uchar::uvalue#0 )
to:printf_uchar::@1
printf_uchar::@1: scope:[printf_uchar] from printf_uchar
[193] *((byte*)&printf_buffer) = 0
[194] uctoa::value#1 = printf_uchar::uvalue#2
[195] call uctoa
to:printf_uchar::@2
printf_uchar::@2: scope:[printf_uchar] from printf_uchar::@1
[196] printf_number_buffer::buffer_sign#2 = *((byte*)&printf_buffer)
[197] call printf_number_buffer
to:printf_uchar::@return
printf_uchar::@return: scope:[printf_uchar] from printf_uchar::@2
[198] return
to:@return
void printf_uint(word printf_uint::uvalue , byte printf_uint::format_min_length , byte printf_uint::format_justify_left , byte printf_uint::format_sign_always , byte printf_uint::format_zero_padding , byte printf_uint::format_upper_case , byte printf_uint::format_radix)
printf_uint: scope:[printf_uint] from main::@13 main::@15
[199] printf_uint::uvalue#2 = phi( main::@13/printf_uint::uvalue#0, main::@15/printf_uint::uvalue#1 )
to:printf_uint::@1
printf_uint::@1: scope:[printf_uint] from printf_uint
[200] *((byte*)&printf_buffer) = 0
[201] utoa::value#1 = printf_uint::uvalue#2
[202] call utoa
to:printf_uint::@2
printf_uint::@2: scope:[printf_uint] from printf_uint::@1
[203] printf_number_buffer::buffer_sign#1 = *((byte*)&printf_buffer)
[204] call printf_number_buffer
to:printf_uint::@return
printf_uint::@return: scope:[printf_uint] from printf_uint::@2
[205] return
to:@return
void vera_layer_mode_tile(byte vera_layer_mode_tile::layer , dword vera_layer_mode_tile::mapbase_address , dword vera_layer_mode_tile::tilebase_address , word vera_layer_mode_tile::mapwidth , word vera_layer_mode_tile::mapheight , byte vera_layer_mode_tile::tilewidth , byte vera_layer_mode_tile::tileheight , byte vera_layer_mode_tile::color_depth)
vera_layer_mode_tile: scope:[vera_layer_mode_tile] from vera_layer_mode_text
[206] phi()
to:vera_layer_mode_tile::@1
vera_layer_mode_tile::@1: scope:[vera_layer_mode_tile] from vera_layer_mode_tile
[207] *(vera_layer_rowshift+vera_layer_mode_text::layer#0) = 8
[208] *(vera_layer_rowskip+vera_layer_mode_text::layer#0*SIZEOF_WORD) = $100
to:vera_layer_mode_tile::@2
vera_layer_mode_tile::@2: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@1
[209] phi()
[210] call vera_layer_set_config
to:vera_layer_mode_tile::@4
vera_layer_mode_tile::@4: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@2
[211] *(vera_mapbase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = 0
[212] *(vera_mapbase_bank+vera_layer_mode_text::layer#0) = 0
[213] *(vera_mapbase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::mapbase_address#0
[214] call vera_layer_set_mapbase
to:vera_layer_mode_tile::@5
vera_layer_mode_tile::@5: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@4
[215] *(vera_tilebase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = <vera_layer_mode_text::tilebase_address#0
[216] *(vera_tilebase_bank+vera_layer_mode_text::layer#0) = 0
[217] *(vera_tilebase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::tilebase_address#0
to:vera_layer_mode_tile::@3
vera_layer_mode_tile::@3: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@5
[218] phi()
[219] call vera_layer_set_tilebase
to:vera_layer_mode_tile::@return
vera_layer_mode_tile::@return: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@3
[220] return
to:@return
void vera_layer_set_text_color_mode(byte vera_layer_set_text_color_mode::layer , byte vera_layer_set_text_color_mode::color_mode)
vera_layer_set_text_color_mode: scope:[vera_layer_set_text_color_mode] from vera_layer_mode_text::@1
[221] vera_layer_set_text_color_mode::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER)
[222] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 & ~VERA_LAYER_CONFIG_256C
[223] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0
to:vera_layer_set_text_color_mode::@return
vera_layer_set_text_color_mode::@return: scope:[vera_layer_set_text_color_mode] from vera_layer_set_text_color_mode
[224] return
to:@return
byte vera_layer_get_mapbase_bank(byte vera_layer_get_mapbase_bank::layer)
vera_layer_get_mapbase_bank: scope:[vera_layer_get_mapbase_bank] from screenlayer
[225] vera_layer_get_mapbase_bank::return#0 = vera_mapbase_bank[vera_layer_get_mapbase_bank::layer#0]
to:vera_layer_get_mapbase_bank::@return
vera_layer_get_mapbase_bank::@return: scope:[vera_layer_get_mapbase_bank] from vera_layer_get_mapbase_bank
[226] return
to:@return
word vera_layer_get_mapbase_offset(byte vera_layer_get_mapbase_offset::layer)
vera_layer_get_mapbase_offset: scope:[vera_layer_get_mapbase_offset] from screenlayer::@3
[227] vera_layer_get_mapbase_offset::$0 = vera_layer_get_mapbase_offset::layer#0 << 1
[228] vera_layer_get_mapbase_offset::return#0 = vera_mapbase_offset[vera_layer_get_mapbase_offset::$0]
to:vera_layer_get_mapbase_offset::@return
vera_layer_get_mapbase_offset::@return: scope:[vera_layer_get_mapbase_offset] from vera_layer_get_mapbase_offset
[229] return
to:@return
byte vera_layer_get_rowshift(byte vera_layer_get_rowshift::layer)
vera_layer_get_rowshift: scope:[vera_layer_get_rowshift] from screenlayer::@1
[230] vera_layer_get_rowshift::return#0 = vera_layer_rowshift[vera_layer_get_rowshift::layer#0]
to:vera_layer_get_rowshift::@return
vera_layer_get_rowshift::@return: scope:[vera_layer_get_rowshift] from vera_layer_get_rowshift
[231] return
to:@return
word vera_layer_get_rowskip(byte vera_layer_get_rowskip::layer)
vera_layer_get_rowskip: scope:[vera_layer_get_rowskip] from screenlayer::@5
[232] vera_layer_get_rowskip::$0 = vera_layer_get_rowskip::layer#0 << 1
[233] vera_layer_get_rowskip::return#0 = vera_layer_rowskip[vera_layer_get_rowskip::$0]
to:vera_layer_get_rowskip::@return
vera_layer_get_rowskip::@return: scope:[vera_layer_get_rowskip] from vera_layer_get_rowskip
[234] return
to:@return
void cputc(byte cputc::c)
cputc: scope:[cputc] from cputs::@2 printf_number_buffer::@3
[235] cputc::c#3 = phi( cputs::@2/cputc::c#0, printf_number_buffer::@3/cputc::c#2 )
[236] vera_layer_get_color::layer#0 = conio_screen_layer
[237] call vera_layer_get_color
[238] vera_layer_get_color::return#3 = vera_layer_get_color::return#2
to:cputc::@7
cputc::@7: scope:[cputc] from cputc
[239] cputc::color#0 = vera_layer_get_color::return#3
[240] cputc::$15 = conio_screen_layer << 1
[241] cputc::conio_addr#0 = (byte*)CONIO_SCREEN_TEXT#101 + conio_line_text[cputc::$15]
[242] cputc::$2 = conio_cursor_x[conio_screen_layer] << 1
[243] cputc::conio_addr#1 = cputc::conio_addr#0 + cputc::$2
[244] if(cputc::c#3=='
') goto cputc::@1
to:cputc::@2
cputc::@2: scope:[cputc] from cputc::@7
[245] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[246] cputc::$4 = < cputc::conio_addr#1
[247] *VERA_ADDRX_L = cputc::$4
[248] cputc::$5 = > cputc::conio_addr#1
[249] *VERA_ADDRX_M = cputc::$5
[250] cputc::$6 = CONIO_SCREEN_BANK#10 | VERA_INC_1
[251] *VERA_ADDRX_H = cputc::$6
[252] *VERA_DATA0 = cputc::c#3
[253] *VERA_DATA0 = cputc::color#0
[254] conio_cursor_x[conio_screen_layer] = ++ conio_cursor_x[conio_screen_layer]
[255] cputc::scroll_enable#0 = conio_scroll_enable[conio_screen_layer]
[256] if(0!=cputc::scroll_enable#0) goto cputc::@5
to:cputc::@3
cputc::@3: scope:[cputc] from cputc::@2
[257] cputc::$16 = (word)conio_cursor_x[conio_screen_layer]
[258] if(cputc::$16!=conio_width) goto cputc::@return
to:cputc::@4
cputc::@4: scope:[cputc] from cputc::@3
[259] phi()
[260] call cputln
to:cputc::@return
cputc::@return: scope:[cputc] from cputc::@1 cputc::@3 cputc::@4 cputc::@5 cputc::@6
[261] return
to:@return
cputc::@5: scope:[cputc] from cputc::@2
[262] if(conio_cursor_x[conio_screen_layer]!=conio_screen_width) goto cputc::@return
to:cputc::@6
cputc::@6: scope:[cputc] from cputc::@5
[263] phi()
[264] call cputln
to:cputc::@return
cputc::@1: scope:[cputc] from cputc::@7
[265] phi()
[266] call cputln
to:cputc::@return
void ultoa(dword ultoa::value , byte* ultoa::buffer , byte ultoa::radix)
ultoa: scope:[ultoa] from printf_ulong::@1
[267] phi()
to:ultoa::@1
ultoa::@1: scope:[ultoa] from ultoa ultoa::@4
[268] ultoa::buffer#11 = phi( ultoa::@4/ultoa::buffer#14, ultoa/(byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[268] ultoa::started#2 = phi( ultoa::@4/ultoa::started#4, ultoa/0 )
[268] ultoa::value#2 = phi( ultoa::@4/ultoa::value#6, ultoa/ultoa::value#1 )
[268] ultoa::digit#2 = phi( ultoa::@4/ultoa::digit#1, ultoa/0 )
[269] if(ultoa::digit#2<8-1) goto ultoa::@2
to:ultoa::@3
ultoa::@3: scope:[ultoa] from ultoa::@1
[270] ultoa::$11 = (byte)ultoa::value#2
[271] *ultoa::buffer#11 = DIGITS[ultoa::$11]
[272] ultoa::buffer#3 = ++ ultoa::buffer#11
[273] *ultoa::buffer#3 = 0
to:ultoa::@return
ultoa::@return: scope:[ultoa] from ultoa::@3
[274] return
to:@return
ultoa::@2: scope:[ultoa] from ultoa::@1
[275] ultoa::$10 = ultoa::digit#2 << 2
[276] ultoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES_LONG[ultoa::$10]
[277] if(0!=ultoa::started#2) goto ultoa::@5
to:ultoa::@7
ultoa::@7: scope:[ultoa] from ultoa::@2
[278] if(ultoa::value#2>=ultoa::digit_value#0) goto ultoa::@5
to:ultoa::@4
ultoa::@4: scope:[ultoa] from ultoa::@6 ultoa::@7
[279] ultoa::buffer#14 = phi( ultoa::@7/ultoa::buffer#11, ultoa::@6/ultoa::buffer#4 )
[279] ultoa::started#4 = phi( ultoa::@7/ultoa::started#2, ultoa::@6/1 )
[279] ultoa::value#6 = phi( ultoa::@7/ultoa::value#2, ultoa::@6/ultoa::value#0 )
[280] ultoa::digit#1 = ++ ultoa::digit#2
to:ultoa::@1
ultoa::@5: scope:[ultoa] from ultoa::@2 ultoa::@7
[281] ultoa_append::buffer#0 = ultoa::buffer#11
[282] ultoa_append::value#0 = ultoa::value#2
[283] ultoa_append::sub#0 = ultoa::digit_value#0
[284] call ultoa_append
[285] ultoa_append::return#0 = ultoa_append::value#2
to:ultoa::@6
ultoa::@6: scope:[ultoa] from ultoa::@5
[286] ultoa::value#0 = ultoa_append::return#0
[287] ultoa::buffer#4 = ++ ultoa::buffer#11
to:ultoa::@4
void printf_number_buffer(byte printf_number_buffer::buffer_sign , byte* printf_number_buffer::buffer_digits , byte printf_number_buffer::format_min_length , byte printf_number_buffer::format_justify_left , byte printf_number_buffer::format_sign_always , byte printf_number_buffer::format_zero_padding , byte printf_number_buffer::format_upper_case , byte printf_number_buffer::format_radix)
printf_number_buffer: scope:[printf_number_buffer] from printf_uchar::@2 printf_uint::@2 printf_ulong::@2
[288] printf_number_buffer::buffer_sign#10 = phi( printf_uchar::@2/printf_number_buffer::buffer_sign#2, printf_uint::@2/printf_number_buffer::buffer_sign#1, printf_ulong::@2/printf_number_buffer::buffer_sign#0 )
to:printf_number_buffer::@1
printf_number_buffer::@1: scope:[printf_number_buffer] from printf_number_buffer
[289] if(0==printf_number_buffer::buffer_sign#10) goto printf_number_buffer::@2
to:printf_number_buffer::@3
printf_number_buffer::@3: scope:[printf_number_buffer] from printf_number_buffer::@1
[290] cputc::c#2 = printf_number_buffer::buffer_sign#10
[291] call cputc
to:printf_number_buffer::@2
printf_number_buffer::@2: scope:[printf_number_buffer] from printf_number_buffer::@1 printf_number_buffer::@3
[292] phi()
[293] call cputs
to:printf_number_buffer::@return
printf_number_buffer::@return: scope:[printf_number_buffer] from printf_number_buffer::@2
[294] return
to:@return
void uctoa(byte uctoa::value , byte* uctoa::buffer , byte uctoa::radix)
uctoa: scope:[uctoa] from printf_uchar::@1
[295] phi()
to:uctoa::@1
uctoa::@1: scope:[uctoa] from uctoa uctoa::@4
[296] uctoa::buffer#11 = phi( uctoa::@4/uctoa::buffer#14, uctoa/(byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[296] uctoa::started#2 = phi( uctoa::@4/uctoa::started#4, uctoa/0 )
[296] uctoa::value#2 = phi( uctoa::@4/uctoa::value#6, uctoa/uctoa::value#1 )
[296] uctoa::digit#2 = phi( uctoa::@4/uctoa::digit#1, uctoa/0 )
[297] if(uctoa::digit#2<2-1) goto uctoa::@2
to:uctoa::@3
uctoa::@3: scope:[uctoa] from uctoa::@1
[298] *uctoa::buffer#11 = DIGITS[uctoa::value#2]
[299] uctoa::buffer#3 = ++ uctoa::buffer#11
[300] *uctoa::buffer#3 = 0
to:uctoa::@return
uctoa::@return: scope:[uctoa] from uctoa::@3
[301] return
to:@return
uctoa::@2: scope:[uctoa] from uctoa::@1
[302] uctoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES_CHAR[uctoa::digit#2]
[303] if(0!=uctoa::started#2) goto uctoa::@5
to:uctoa::@7
uctoa::@7: scope:[uctoa] from uctoa::@2
[304] if(uctoa::value#2>=uctoa::digit_value#0) goto uctoa::@5
to:uctoa::@4
uctoa::@4: scope:[uctoa] from uctoa::@6 uctoa::@7
[305] uctoa::buffer#14 = phi( uctoa::@7/uctoa::buffer#11, uctoa::@6/uctoa::buffer#4 )
[305] uctoa::started#4 = phi( uctoa::@7/uctoa::started#2, uctoa::@6/1 )
[305] uctoa::value#6 = phi( uctoa::@7/uctoa::value#2, uctoa::@6/uctoa::value#0 )
[306] uctoa::digit#1 = ++ uctoa::digit#2
to:uctoa::@1
uctoa::@5: scope:[uctoa] from uctoa::@2 uctoa::@7
[307] uctoa_append::buffer#0 = uctoa::buffer#11
[308] uctoa_append::value#0 = uctoa::value#2
[309] uctoa_append::sub#0 = uctoa::digit_value#0
[310] call uctoa_append
[311] uctoa_append::return#0 = uctoa_append::value#2
to:uctoa::@6
uctoa::@6: scope:[uctoa] from uctoa::@5
[312] uctoa::value#0 = uctoa_append::return#0
[313] uctoa::buffer#4 = ++ uctoa::buffer#11
to:uctoa::@4
void utoa(word utoa::value , byte* utoa::buffer , byte utoa::radix)
utoa: scope:[utoa] from printf_uint::@1
[314] phi()
to:utoa::@1
utoa::@1: scope:[utoa] from utoa utoa::@4
[315] utoa::buffer#11 = phi( utoa::@4/utoa::buffer#14, utoa/(byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS )
[315] utoa::started#2 = phi( utoa::@4/utoa::started#4, utoa/0 )
[315] utoa::value#2 = phi( utoa::@4/utoa::value#6, utoa/utoa::value#1 )
[315] utoa::digit#2 = phi( utoa::@4/utoa::digit#1, utoa/0 )
[316] if(utoa::digit#2<4-1) goto utoa::@2
to:utoa::@3
utoa::@3: scope:[utoa] from utoa::@1
[317] utoa::$11 = (byte)utoa::value#2
[318] *utoa::buffer#11 = DIGITS[utoa::$11]
[319] utoa::buffer#3 = ++ utoa::buffer#11
[320] *utoa::buffer#3 = 0
to:utoa::@return
utoa::@return: scope:[utoa] from utoa::@3
[321] return
to:@return
utoa::@2: scope:[utoa] from utoa::@1
[322] utoa::$10 = utoa::digit#2 << 1
[323] utoa::digit_value#0 = RADIX_HEXADECIMAL_VALUES[utoa::$10]
[324] if(0!=utoa::started#2) goto utoa::@5
to:utoa::@7
utoa::@7: scope:[utoa] from utoa::@2
[325] if(utoa::value#2>=utoa::digit_value#0) goto utoa::@5
to:utoa::@4
utoa::@4: scope:[utoa] from utoa::@6 utoa::@7
[326] utoa::buffer#14 = phi( utoa::@7/utoa::buffer#11, utoa::@6/utoa::buffer#4 )
[326] utoa::started#4 = phi( utoa::@7/utoa::started#2, utoa::@6/1 )
[326] utoa::value#6 = phi( utoa::@7/utoa::value#2, utoa::@6/utoa::value#0 )
[327] utoa::digit#1 = ++ utoa::digit#2
to:utoa::@1
utoa::@5: scope:[utoa] from utoa::@2 utoa::@7
[328] utoa_append::buffer#0 = utoa::buffer#11
[329] utoa_append::value#0 = utoa::value#2
[330] utoa_append::sub#0 = utoa::digit_value#0
[331] call utoa_append
[332] utoa_append::return#0 = utoa_append::value#2
to:utoa::@6
utoa::@6: scope:[utoa] from utoa::@5
[333] utoa::value#0 = utoa_append::return#0
[334] utoa::buffer#4 = ++ utoa::buffer#11
to:utoa::@4
void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config)
vera_layer_set_config: scope:[vera_layer_set_config] from vera_layer_mode_tile::@2
[335] vera_layer_set_config::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER)
[336] *vera_layer_set_config::addr#0 = vera_layer_mode_tile::config#10
to:vera_layer_set_config::@return
vera_layer_set_config::@return: scope:[vera_layer_set_config] from vera_layer_set_config
[337] return
to:@return
void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase)
vera_layer_set_tilebase: scope:[vera_layer_set_tilebase] from vera_layer_mode_tile::@3
[338] vera_layer_set_tilebase::addr#0 = *(vera_layer_tilebase+vera_layer_mode_text::layer#0*SIZEOF_POINTER)
[339] *vera_layer_set_tilebase::addr#0 = ><vera_layer_mode_tile::tilebase_address#0&VERA_LAYER_TILEBASE_MASK
to:vera_layer_set_tilebase::@return
vera_layer_set_tilebase::@return: scope:[vera_layer_set_tilebase] from vera_layer_set_tilebase
[340] return
to:@return
byte vera_layer_get_color(byte vera_layer_get_color::layer)
vera_layer_get_color: scope:[vera_layer_get_color] from clearline cputc
[341] vera_layer_get_color::layer#2 = phi( clearline/vera_layer_get_color::layer#1, cputc/vera_layer_get_color::layer#0 )
[342] vera_layer_get_color::$3 = vera_layer_get_color::layer#2 << 1
[343] vera_layer_get_color::addr#0 = vera_layer_config[vera_layer_get_color::$3]
[344] vera_layer_get_color::$0 = *vera_layer_get_color::addr#0 & VERA_LAYER_CONFIG_256C
[345] if(0!=vera_layer_get_color::$0) goto vera_layer_get_color::@1
to:vera_layer_get_color::@2
vera_layer_get_color::@2: scope:[vera_layer_get_color] from vera_layer_get_color
[346] vera_layer_get_color::$1 = vera_layer_backcolor[vera_layer_get_color::layer#2] << 4
[347] vera_layer_get_color::return#1 = vera_layer_get_color::$1 | vera_layer_textcolor[vera_layer_get_color::layer#2]
to:vera_layer_get_color::@return
vera_layer_get_color::@return: scope:[vera_layer_get_color] from vera_layer_get_color::@1 vera_layer_get_color::@2
[348] vera_layer_get_color::return#2 = phi( vera_layer_get_color::@1/vera_layer_get_color::return#0, vera_layer_get_color::@2/vera_layer_get_color::return#1 )
[349] return
to:@return
vera_layer_get_color::@1: scope:[vera_layer_get_color] from vera_layer_get_color
[350] vera_layer_get_color::return#0 = vera_layer_textcolor[vera_layer_get_color::layer#2]
to:vera_layer_get_color::@return
void cputln()
cputln: scope:[cputln] from cputc::@1 cputc::@4 cputc::@6
[351] cputln::$2 = conio_screen_layer << 1
[352] cputln::temp#0 = conio_line_text[cputln::$2]
[353] cputln::temp#1 = cputln::temp#0 + conio_rowskip
[354] cputln::$3 = conio_screen_layer << 1
[355] conio_line_text[cputln::$3] = cputln::temp#1
[356] conio_cursor_x[conio_screen_layer] = 0
[357] conio_cursor_y[conio_screen_layer] = ++ conio_cursor_y[conio_screen_layer]
[358] call cscroll
to:cputln::@return
cputln::@return: scope:[cputln] from cputln
[359] return
to:@return
dword ultoa_append(byte* ultoa_append::buffer , dword ultoa_append::value , dword ultoa_append::sub)
ultoa_append: scope:[ultoa_append] from ultoa::@5
[360] phi()
to:ultoa_append::@1
ultoa_append::@1: scope:[ultoa_append] from ultoa_append ultoa_append::@2
[361] ultoa_append::digit#2 = phi( ultoa_append/0, ultoa_append::@2/ultoa_append::digit#1 )
[361] ultoa_append::value#2 = phi( ultoa_append/ultoa_append::value#0, ultoa_append::@2/ultoa_append::value#1 )
[362] if(ultoa_append::value#2>=ultoa_append::sub#0) goto ultoa_append::@2
to:ultoa_append::@3
ultoa_append::@3: scope:[ultoa_append] from ultoa_append::@1
[363] *ultoa_append::buffer#0 = DIGITS[ultoa_append::digit#2]
to:ultoa_append::@return
ultoa_append::@return: scope:[ultoa_append] from ultoa_append::@3
[364] return
to:@return
ultoa_append::@2: scope:[ultoa_append] from ultoa_append::@1
[365] ultoa_append::digit#1 = ++ ultoa_append::digit#2
[366] ultoa_append::value#1 = ultoa_append::value#2 - ultoa_append::sub#0
to:ultoa_append::@1
byte uctoa_append(byte* uctoa_append::buffer , byte uctoa_append::value , byte uctoa_append::sub)
uctoa_append: scope:[uctoa_append] from uctoa::@5
[367] phi()
to:uctoa_append::@1
uctoa_append::@1: scope:[uctoa_append] from uctoa_append uctoa_append::@2
[368] uctoa_append::digit#2 = phi( uctoa_append/0, uctoa_append::@2/uctoa_append::digit#1 )
[368] uctoa_append::value#2 = phi( uctoa_append/uctoa_append::value#0, uctoa_append::@2/uctoa_append::value#1 )
[369] if(uctoa_append::value#2>=uctoa_append::sub#0) goto uctoa_append::@2
to:uctoa_append::@3
uctoa_append::@3: scope:[uctoa_append] from uctoa_append::@1
[370] *uctoa_append::buffer#0 = DIGITS[uctoa_append::digit#2]
to:uctoa_append::@return
uctoa_append::@return: scope:[uctoa_append] from uctoa_append::@3
[371] return
to:@return
uctoa_append::@2: scope:[uctoa_append] from uctoa_append::@1
[372] uctoa_append::digit#1 = ++ uctoa_append::digit#2
[373] uctoa_append::value#1 = uctoa_append::value#2 - uctoa_append::sub#0
to:uctoa_append::@1
word utoa_append(byte* utoa_append::buffer , word utoa_append::value , word utoa_append::sub)
utoa_append: scope:[utoa_append] from utoa::@5
[374] phi()
to:utoa_append::@1
utoa_append::@1: scope:[utoa_append] from utoa_append utoa_append::@2
[375] utoa_append::digit#2 = phi( utoa_append/0, utoa_append::@2/utoa_append::digit#1 )
[375] utoa_append::value#2 = phi( utoa_append/utoa_append::value#0, utoa_append::@2/utoa_append::value#1 )
[376] if(utoa_append::value#2>=utoa_append::sub#0) goto utoa_append::@2
to:utoa_append::@3
utoa_append::@3: scope:[utoa_append] from utoa_append::@1
[377] *utoa_append::buffer#0 = DIGITS[utoa_append::digit#2]
to:utoa_append::@return
utoa_append::@return: scope:[utoa_append] from utoa_append::@3
[378] return
to:@return
utoa_append::@2: scope:[utoa_append] from utoa_append::@1
[379] utoa_append::digit#1 = ++ utoa_append::digit#2
[380] utoa_append::value#1 = utoa_append::value#2 - utoa_append::sub#0
to:utoa_append::@1
void cscroll()
cscroll: scope:[cscroll] from cputln
[381] if(conio_cursor_y[conio_screen_layer]<conio_screen_height) goto cscroll::@return
to:cscroll::@1
cscroll::@1: scope:[cscroll] from cscroll
[382] if(0!=conio_scroll_enable[conio_screen_layer]) goto cscroll::@4
to:cscroll::@2
cscroll::@2: scope:[cscroll] from cscroll::@1
[383] if(conio_cursor_y[conio_screen_layer]<conio_height) goto cscroll::@return
to:cscroll::@3
cscroll::@3: scope:[cscroll] from cscroll::@2
[384] phi()
to:cscroll::@return
cscroll::@return: scope:[cscroll] from cscroll cscroll::@2 cscroll::@3 cscroll::@5
[385] return
to:@return
cscroll::@4: scope:[cscroll] from cscroll::@1
[386] phi()
[387] call insertup
to:cscroll::@5
cscroll::@5: scope:[cscroll] from cscroll::@4
[388] gotoxy::y#2 = conio_screen_height - 1
[389] call gotoxy
to:cscroll::@return
void insertup()
insertup: scope:[insertup] from cscroll::@4
[390] insertup::cy#0 = conio_cursor_y[conio_screen_layer]
[391] insertup::width#0 = conio_screen_width << 1
to:insertup::@1
insertup::@1: scope:[insertup] from insertup insertup::@4
[392] insertup::i#2 = phi( insertup/1, insertup::@4/insertup::i#1 )
[393] if(insertup::i#2<=insertup::cy#0) goto insertup::@2
to:insertup::@3
insertup::@3: scope:[insertup] from insertup::@1
[394] phi()
[395] call clearline
to:insertup::@return
insertup::@return: scope:[insertup] from insertup::@3
[396] return
to:@return
insertup::@2: scope:[insertup] from insertup::@1
[397] insertup::$3 = insertup::i#2 - 1
[398] insertup::line#0 = insertup::$3 << conio_rowshift
[399] insertup::start#0 = (byte*)CONIO_SCREEN_TEXT#101 + insertup::line#0
[400] memcpy_in_vram::src#0 = insertup::start#0 + conio_rowskip
[401] memcpy_in_vram::dest#0 = (void*)insertup::start#0
[402] memcpy_in_vram::num#0 = insertup::width#0
[403] call memcpy_in_vram
to:insertup::@4
insertup::@4: scope:[insertup] from insertup::@2
[404] insertup::i#1 = ++ insertup::i#2
to:insertup::@1
void clearline()
clearline: scope:[clearline] from insertup::@3
[405] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[406] clearline::$5 = conio_screen_layer << 1
[407] clearline::addr#0 = (byte*)CONIO_SCREEN_TEXT#101 + conio_line_text[clearline::$5]
[408] clearline::$1 = < clearline::addr#0
[409] *VERA_ADDRX_L = clearline::$1
[410] clearline::$2 = > clearline::addr#0
[411] *VERA_ADDRX_M = clearline::$2
[412] *VERA_ADDRX_H = VERA_INC_1
[413] vera_layer_get_color::layer#1 = conio_screen_layer
[414] call vera_layer_get_color
[415] vera_layer_get_color::return#4 = vera_layer_get_color::return#2
to:clearline::@4
clearline::@4: scope:[clearline] from clearline
[416] clearline::color#0 = vera_layer_get_color::return#4
to:clearline::@1
clearline::@1: scope:[clearline] from clearline::@2 clearline::@4
[417] clearline::c#2 = phi( clearline::@2/clearline::c#1, clearline::@4/0 )
[418] if(clearline::c#2<conio_screen_width) goto clearline::@2
to:clearline::@3
clearline::@3: scope:[clearline] from clearline::@1
[419] conio_cursor_x[conio_screen_layer] = 0
to:clearline::@return
clearline::@return: scope:[clearline] from clearline::@3
[420] return
to:@return
clearline::@2: scope:[clearline] from clearline::@1
[421] *VERA_DATA0 = ' '
[422] *VERA_DATA0 = clearline::color#0
[423] clearline::c#1 = ++ clearline::c#2
to:clearline::@1
void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest , byte memcpy_in_vram::dest_increment , byte memcpy_in_vram::src_bank , void* memcpy_in_vram::src , byte memcpy_in_vram::src_increment , word memcpy_in_vram::num)
memcpy_in_vram: scope:[memcpy_in_vram] from insertup::@2
[424] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[425] memcpy_in_vram::$0 = < (void*)memcpy_in_vram::src#0
[426] *VERA_ADDRX_L = memcpy_in_vram::$0
[427] memcpy_in_vram::$1 = > (void*)memcpy_in_vram::src#0
[428] *VERA_ADDRX_M = memcpy_in_vram::$1
[429] *VERA_ADDRX_H = VERA_INC_1
[430] *VERA_CTRL = *VERA_CTRL | VERA_ADDRSEL
[431] memcpy_in_vram::$3 = < memcpy_in_vram::dest#0
[432] *VERA_ADDRX_L = memcpy_in_vram::$3
[433] memcpy_in_vram::$4 = > memcpy_in_vram::dest#0
[434] *VERA_ADDRX_M = memcpy_in_vram::$4
[435] *VERA_ADDRX_H = VERA_INC_1
to:memcpy_in_vram::@1
memcpy_in_vram::@1: scope:[memcpy_in_vram] from memcpy_in_vram memcpy_in_vram::@2
[436] memcpy_in_vram::i#2 = phi( memcpy_in_vram/0, memcpy_in_vram::@2/memcpy_in_vram::i#1 )
[437] if(memcpy_in_vram::i#2<memcpy_in_vram::num#0) goto memcpy_in_vram::@2
to:memcpy_in_vram::@return
memcpy_in_vram::@return: scope:[memcpy_in_vram] from memcpy_in_vram::@1
[438] return
to:@return
memcpy_in_vram::@2: scope:[memcpy_in_vram] from memcpy_in_vram::@1
[439] *VERA_DATA1 = *VERA_DATA0
[440] memcpy_in_vram::i#1 = ++ memcpy_in_vram::i#2
to:memcpy_in_vram::@1

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,652 @@
const nomodify byte BLUE = 6
byte CONIO_SCREEN_BANK
byte CONIO_SCREEN_BANK#10 CONIO_SCREEN_BANK zp[1]:56 523560.7434554974
byte* CONIO_SCREEN_TEXT
word CONIO_SCREEN_TEXT#101 CONIO_SCREEN_TEXT zp[2]:57 0.4225941422594142
const byte* DIGITS[] = "0123456789abcdef"z
const byte OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_DIGITS = 1
const byte RADIX::BINARY = 2
const byte RADIX::DECIMAL = $a
const byte RADIX::HEXADECIMAL = $10
const byte RADIX::OCTAL = 8
const word* RADIX_HEXADECIMAL_VALUES[] = { $1000, $100, $10 }
const byte* RADIX_HEXADECIMAL_VALUES_CHAR[] = { $10 }
const dword* RADIX_HEXADECIMAL_VALUES_LONG[] = { $10000000, $1000000, $100000, $10000, $1000, $100, $10 }
const byte SIZEOF_DWORD = 4
const byte SIZEOF_POINTER = 2
const byte SIZEOF_STRUCT_PRINTF_BUFFER_NUMBER = $c
const byte SIZEOF_WORD = 2
const nomodify byte VERA_ADDRSEL = 1
const nomodify byte* VERA_ADDRX_H = (byte*) 40738
const nomodify byte* VERA_ADDRX_L = (byte*) 40736
const nomodify byte* VERA_ADDRX_M = (byte*) 40737
const nomodify byte* VERA_CTRL = (byte*) 40741
const nomodify byte* VERA_DATA0 = (byte*) 40739
const nomodify byte* VERA_DATA1 = (byte*) 40740
const nomodify byte* VERA_DC_HSCALE = (byte*) 40746
const nomodify byte* VERA_DC_VSCALE = (byte*) 40747
const nomodify byte VERA_INC_1 = $10
const nomodify byte* VERA_L0_CONFIG = (byte*) 40749
const nomodify byte* VERA_L0_MAPBASE = (byte*) 40750
const nomodify byte* VERA_L0_TILEBASE = (byte*) 40751
const nomodify byte* VERA_L1_CONFIG = (byte*) 40756
const nomodify byte* VERA_L1_MAPBASE = (byte*) 40757
const nomodify byte* VERA_L1_TILEBASE = (byte*) 40758
const nomodify byte VERA_LAYER_CONFIG_256C = 8
const to_nomodify word* VERA_LAYER_HEIGHT[4] = { $20, $40, $80, $100 }
const nomodify byte VERA_LAYER_HEIGHT_64 = $40
const nomodify byte VERA_LAYER_HEIGHT_MASK = $c0
const nomodify byte VERA_LAYER_TILEBASE_MASK = $fc
const to_nomodify word* VERA_LAYER_WIDTH[4] = { $20, $40, $80, $100 }
const nomodify byte VERA_LAYER_WIDTH_128 = $20
const nomodify byte VERA_LAYER_WIDTH_MASK = $30
const nomodify byte WHITE = 1
void __start()
void clearline()
byte~ clearline::$1 reg byte a 2.000000000002E12
byte~ clearline::$2 reg byte a 2.000000000002E12
byte~ clearline::$5 reg byte a 2.000000000002E12
byte* clearline::addr
byte* clearline::addr#0 addr zp[2]:85 1.000000000001E12
word clearline::c
word clearline::c#1 c zp[2]:32 2.000000000000002E15
word clearline::c#2 c zp[2]:32 7.500000000000008E14
byte clearline::color
byte clearline::color#0 reg byte x 1.668333333333337E14
const byte* conio_cursor_x[2] = { 0, 0 }
const byte* conio_cursor_y[2] = { 0, 0 }
word conio_height loadstore zp[2]:23 5.714285773714286E7
const word* conio_line_text[2] = { 0, 0 }
byte conio_rowshift loadstore zp[1]:25 4.5917431192708716E11
word conio_rowskip loadstore zp[2]:26 5.00005000000525E11
volatile byte conio_screen_height loadstore zp[1]:19 6.091370559746193E8
byte conio_screen_layer loadstore zp[1]:20 1.3214230772042307E10
volatile byte conio_screen_width loadstore zp[1]:18 4.311207327586233E12
const byte* conio_scroll_enable[2] = { 1, 1 }
word conio_width loadstore zp[2]:21 564972.3389830509
void conio_x16_init()
const nomodify byte* conio_x16_init::BASIC_CURSOR_LINE = (byte*) 214
byte conio_x16_init::line
byte conio_x16_init::line#0 line zp[1]:2 2.1999999999999997
byte conio_x16_init::line#1 line zp[1]:2 22.0
byte conio_x16_init::line#3 line zp[1]:2 33.0
void cputc(byte cputc::c)
byte~ cputc::$15 reg byte a 2.00000002E8
word~ cputc::$16 zp[2]:65 2.00000002E8
byte~ cputc::$2 reg byte a 2.00000002E8
byte~ cputc::$4 reg byte a 2.00000002E8
byte~ cputc::$5 reg byte a 2.00000002E8
byte~ cputc::$6 reg byte a 2.00000002E8
byte cputc::c
byte cputc::c#0 c zp[1]:17 2.0000002E7
byte cputc::c#2 c zp[1]:17 20002.0
byte cputc::c#3 c zp[1]:17 1.2353529647058824E7
byte cputc::color
byte cputc::color#0 reg byte x 1.428571442857143E7
byte* cputc::conio_addr
byte* cputc::conio_addr#0 conio_addr zp[2]:71 1.00000001E8
byte* cputc::conio_addr#1 conio_addr zp[2]:71 6.0000000599999994E7
byte cputc::scroll_enable
byte cputc::scroll_enable#0 reg byte a 2.00000002E8
void cputln()
byte~ cputln::$2 reg byte a 2.000000002E9
byte~ cputln::$3 reg byte a 2.000000002E9
word cputln::temp
word cputln::temp#0 temp zp[2]:77 2.000000002E9
word cputln::temp#1 temp zp[2]:77 1.000000001E9
void cputs(to_nomodify byte* cputs::s)
byte cputs::c
byte cputs::c#1 reg byte a 1.0000001E7
to_nomodify byte* cputs::s
to_nomodify byte* cputs::s#0 s zp[2]:34 5000000.5
to_nomodify byte* cputs::s#10 s zp[2]:34 1.5050002E7
to_nomodify byte* cputs::s#11 s zp[2]:34 100001.0
void cscroll()
void gotoxy(byte gotoxy::x , byte gotoxy::y)
byte~ gotoxy::$5 reg byte a 2.00000000002E11
word~ gotoxy::$6 zp[2]:61 2.00000000002E11
word gotoxy::line_offset
word gotoxy::line_offset#0 line_offset zp[2]:61 1.00000000001E11
byte gotoxy::x
byte gotoxy::y
byte gotoxy::y#0 reg byte x 22.0
byte gotoxy::y#2 reg byte x 2.0000000002E10
byte gotoxy::y#3 reg byte x 7.000000000466667E10
byte gotoxy::y#4 reg byte x 4.00000000004E10
void insertup()
byte~ insertup::$3 reg byte a 2.00000000000002E14
byte insertup::cy
byte insertup::cy#0 cy zp[1]:79 8.341666666666834E12
byte insertup::i
byte insertup::i#1 reg byte x 2.00000000000002E14
byte insertup::i#2 reg byte x 4.444444444444489E13
word insertup::line
word insertup::line#0 line zp[2]:81 2.00000000000002E14
byte* insertup::start
byte* insertup::start#0 start zp[2]:81 1.00000000000001E14
byte insertup::width
byte insertup::width#0 width zp[1]:80 9.100000000000182E12
void main()
dword~ main::$1 zp[4]:28 202.0
word~ main::$10 zp[2]:38 202.0
word~ main::$11 zp[2]:38 202.0
byte~ main::$12 reg byte a 101.0
word~ main::$13 zp[2]:36 101.0
word~ main::$14 zp[2]:43 202.0
word~ main::$15 zp[2]:43 202.0
byte~ main::$16 reg byte y 33.666666666666664
word~ main::$17 zp[2]:45 202.0
byte~ main::$18 reg byte x 101.0
word~ main::$19 zp[2]:47 202.0
word~ main::$20 zp[2]:47 40.4
word~ main::$21 zp[2]:49 202.0
word~ main::$22 zp[2]:49 202.0
byte~ main::$23 reg byte a 101.0
word~ main::$24 zp[2]:47 101.0
word~ main::$25 zp[2]:15 202.0
word~ main::$27 zp[2]:54 202.0
word~ main::$3 zp[2]:32 202.0
word~ main::$30 zp[2]:36 202.0
word~ main::$31 zp[2]:40 202.0
word~ main::$32 zp[2]:47 202.0
word~ main::$33 zp[2]:51 202.0
word~ main::$4 zp[2]:32 202.0
byte~ main::$5 reg byte y 33.666666666666664
word~ main::$6 zp[2]:34 202.0
byte~ main::$7 reg byte x 101.0
word~ main::$8 zp[2]:36 202.0
word~ main::$9 zp[2]:36 40.4
byte main::bankbeg
byte main::bankbeg#0 bankbeg zp[1]:42 5.9411764705882355
byte main::bankend
byte main::bankend#0 bankend zp[1]:53 8.416666666666666
word main::beg
word main::beg#0 beg zp[2]:15 67.33333333333333
word main::beg#1 beg zp[2]:15 8.782608695652174
const nomodify word main::borderbeg = $a000
dword main::calcbeg
dword main::calcend
dword main::calcend#0 calcend zp[4]:28 13.772727272727272
word main::end
word main::end#0 end zp[2]:54 101.0
word main::end#1 end zp[2]:54 7.769230769230769
const word main::inc = $123
dword main::num
dword main::num#1 num zp[4]:7 151.5
dword main::num#10 num zp[4]:7 6.029850746268656
const byte* main::s[6] = "cbeg="
const byte* main::s1[7] = ", add="
const byte* main::s2[8] = ", cend="
const byte* main::s3[8] = ", bbeg="
const byte* main::s4[8] = ", bend="
const byte* main::s5[7] = ", beg="
const byte* main::s6[7] = ", end="
const byte* main::s7[2] = "
"
dword main::src1
dword main::src1#1 src1 zp[4]:3 202.0
dword main::src1#10 src1 zp[4]:3 13.367647058823529
void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest , byte memcpy_in_vram::dest_increment , byte memcpy_in_vram::src_bank , void* memcpy_in_vram::src , byte memcpy_in_vram::src_increment , word memcpy_in_vram::num)
byte~ memcpy_in_vram::$0 reg byte a 2.000000000000002E15
byte~ memcpy_in_vram::$1 reg byte a 2.000000000000002E15
byte~ memcpy_in_vram::$3 reg byte a 2.000000000000002E15
byte~ memcpy_in_vram::$4 reg byte a 2.000000000000002E15
void* memcpy_in_vram::dest
void* memcpy_in_vram::dest#0 dest zp[2]:81 1.909090909090912E14
byte memcpy_in_vram::dest_bank
byte memcpy_in_vram::dest_increment
word memcpy_in_vram::i
word memcpy_in_vram::i#1 i zp[2]:32 2.0E19
word memcpy_in_vram::i#2 i zp[2]:32 1.0E19
word memcpy_in_vram::num
word memcpy_in_vram::num#0 num zp[2]:83 5.8824117647058829E17
void* memcpy_in_vram::src
byte* memcpy_in_vram::src#0 src zp[2]:85 1.6666666666666834E13
byte memcpy_in_vram::src_bank
byte memcpy_in_vram::src_increment
struct printf_buffer_number printf_buffer loadstore mem[12] = {}
void printf_number_buffer(byte printf_number_buffer::buffer_sign , byte* printf_number_buffer::buffer_digits , byte printf_number_buffer::format_min_length , byte printf_number_buffer::format_justify_left , byte printf_number_buffer::format_sign_always , byte printf_number_buffer::format_zero_padding , byte printf_number_buffer::format_upper_case , byte printf_number_buffer::format_radix)
struct printf_buffer_number printf_number_buffer::buffer
byte* printf_number_buffer::buffer_digits
byte printf_number_buffer::buffer_sign
byte printf_number_buffer::buffer_sign#0 reg byte a 2002.0
byte printf_number_buffer::buffer_sign#1 reg byte a 2002.0
byte printf_number_buffer::buffer_sign#10 reg byte a 11502.5
byte printf_number_buffer::buffer_sign#2 reg byte a 2002.0
struct printf_format_number printf_number_buffer::format
byte printf_number_buffer::format_justify_left
byte printf_number_buffer::format_min_length
byte printf_number_buffer::format_radix
byte printf_number_buffer::format_sign_always
byte printf_number_buffer::format_upper_case
byte printf_number_buffer::format_zero_padding
signed byte printf_number_buffer::len
signed byte printf_number_buffer::padding
void printf_uchar(byte printf_uchar::uvalue , byte printf_uchar::format_min_length , byte printf_uchar::format_justify_left , byte printf_uchar::format_sign_always , byte printf_uchar::format_zero_padding , byte printf_uchar::format_upper_case , byte printf_uchar::format_radix)
struct printf_format_number printf_uchar::format
byte printf_uchar::format_justify_left
byte printf_uchar::format_min_length
byte printf_uchar::format_radix
byte printf_uchar::format_sign_always
byte printf_uchar::format_upper_case
byte printf_uchar::format_zero_padding
byte printf_uchar::uvalue
byte printf_uchar::uvalue#0 reg byte x 202.0
byte printf_uchar::uvalue#1 reg byte x 202.0
byte printf_uchar::uvalue#2 reg byte x 601.5
void printf_uint(word printf_uint::uvalue , byte printf_uint::format_min_length , byte printf_uint::format_justify_left , byte printf_uint::format_sign_always , byte printf_uint::format_zero_padding , byte printf_uint::format_upper_case , byte printf_uint::format_radix)
struct printf_format_number printf_uint::format
byte printf_uint::format_justify_left
byte printf_uint::format_min_length
byte printf_uint::format_radix
byte printf_uint::format_sign_always
byte printf_uint::format_upper_case
byte printf_uint::format_zero_padding
word printf_uint::uvalue
word printf_uint::uvalue#0 uvalue zp[2]:15 202.0
word printf_uint::uvalue#1 uvalue zp[2]:15 202.0
word printf_uint::uvalue#2 uvalue zp[2]:15 601.5
void printf_ulong(dword printf_ulong::uvalue , byte printf_ulong::format_min_length , byte printf_ulong::format_justify_left , byte printf_ulong::format_sign_always , byte printf_ulong::format_zero_padding , byte printf_ulong::format_upper_case , byte printf_ulong::format_radix)
struct printf_format_number printf_ulong::format
byte printf_ulong::format_justify_left
byte printf_ulong::format_min_length
byte printf_ulong::format_radix
byte printf_ulong::format_sign_always
byte printf_ulong::format_upper_case
byte printf_ulong::format_zero_padding
dword printf_ulong::uvalue
dword printf_ulong::uvalue#0 uvalue zp[4]:11 202.0
dword printf_ulong::uvalue#1 uvalue zp[4]:11 202.0
dword printf_ulong::uvalue#2 uvalue zp[4]:11 202.0
dword printf_ulong::uvalue#3 uvalue zp[4]:11 652.0
void screenlayer(byte screenlayer::layer)
word~ screenlayer::$2 zp[2]:59 202.0
byte~ screenlayer::$3 reg byte a 202.0
word~ screenlayer::$4 zp[2]:61 202.0
word~ screenlayer::$5 zp[2]:73 202.0
byte screenlayer::layer
const byte screenlayer::layer#0 layer = 1
byte~ screenlayer::vera_layer_get_height1_$0 reg byte a 202.0
byte~ screenlayer::vera_layer_get_height1_$1 reg byte a 202.0
byte~ screenlayer::vera_layer_get_height1_$2 reg byte a 202.0
byte~ screenlayer::vera_layer_get_height1_$3 reg byte a 202.0
byte* screenlayer::vera_layer_get_height1_config
byte* screenlayer::vera_layer_get_height1_config#0 vera_layer_get_height1_config zp[2]:63 202.0
byte screenlayer::vera_layer_get_height1_layer
byte screenlayer::vera_layer_get_height1_layer#0 reg byte a 202.0
word screenlayer::vera_layer_get_height1_return
word screenlayer::vera_layer_get_height1_return#0 vera_layer_get_height1_return zp[2]:73 202.0
word screenlayer::vera_layer_get_height1_return#1 vera_layer_get_height1_return zp[2]:73 202.0
byte~ screenlayer::vera_layer_get_width1_$0 reg byte a 202.0
byte~ screenlayer::vera_layer_get_width1_$1 reg byte a 202.0
byte~ screenlayer::vera_layer_get_width1_$2 reg byte a 202.0
byte~ screenlayer::vera_layer_get_width1_$3 reg byte a 202.0
byte* screenlayer::vera_layer_get_width1_config
byte* screenlayer::vera_layer_get_width1_config#0 vera_layer_get_width1_config zp[2]:75 202.0
byte screenlayer::vera_layer_get_width1_layer
byte screenlayer::vera_layer_get_width1_layer#0 reg byte a 202.0
word screenlayer::vera_layer_get_width1_return
word screenlayer::vera_layer_get_width1_return#0 vera_layer_get_width1_return zp[2]:59 202.0
word screenlayer::vera_layer_get_width1_return#1 vera_layer_get_width1_return zp[2]:59 202.0
void screensize(byte* screensize::x , byte* screensize::y)
byte~ screensize::$1 reg byte a 202.0
byte~ screensize::$3 reg byte a 202.0
byte screensize::hscale
byte screensize::hscale#0 reg byte a 202.0
byte screensize::vscale
byte screensize::vscale#0 reg byte a 202.0
byte* screensize::x
const byte* screensize::x#0 x = &conio_screen_width
byte* screensize::y
const byte* screensize::y#0 y = &conio_screen_height
void uctoa(byte uctoa::value , byte* uctoa::buffer , byte uctoa::radix)
byte* uctoa::buffer
byte* uctoa::buffer#11 buffer zp[2]:34 335000.50000000006
byte* uctoa::buffer#14 buffer zp[2]:34 1500001.5
byte* uctoa::buffer#3 buffer zp[2]:34 20002.0
byte* uctoa::buffer#4 buffer zp[2]:34 2000002.0
byte uctoa::digit
byte uctoa::digit#1 digit zp[1]:17 2000002.0
byte uctoa::digit#2 digit zp[1]:17 307692.6153846154
byte uctoa::digit_value
byte uctoa::digit_value#0 digit_value zp[1]:79 600000.6000000001
byte* uctoa::digit_values
byte uctoa::max_digits
byte uctoa::radix
byte uctoa::started
byte uctoa::started#2 started zp[1]:42 600000.6000000001
byte uctoa::started#4 started zp[1]:42 1000001.0
byte uctoa::value
byte uctoa::value#0 reg byte x 1000001.0
byte uctoa::value#1 reg byte x 5501.0
byte uctoa::value#2 reg byte x 670001.0000000001
byte uctoa::value#6 reg byte x 1500001.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 buffer zp[2]:34 1375000.25
byte uctoa_append::digit
byte uctoa_append::digit#1 reg byte y 1.0000000001E10
byte uctoa_append::digit#2 reg byte y 1.00050000015E10
byte uctoa_append::return
byte uctoa_append::return#0 reg byte x 2000002.0
byte uctoa_append::sub
byte uctoa_append::sub#0 sub zp[1]:79 3.3335000005E9
byte uctoa_append::value
byte uctoa_append::value#0 reg byte x 3666667.333333333
byte uctoa_append::value#1 reg byte x 2.0000000002E10
byte uctoa_append::value#2 reg byte x 5.001833334166666E9
void ultoa(dword ultoa::value , byte* ultoa::buffer , byte ultoa::radix)
byte~ ultoa::$10 reg byte a 2000002.0
byte~ ultoa::$11 reg byte a 20002.0
byte* ultoa::buffer
byte* ultoa::buffer#11 buffer zp[2]:34 287143.2857142857
byte* ultoa::buffer#14 buffer zp[2]:34 1500001.5
byte* ultoa::buffer#3 buffer zp[2]:34 20002.0
byte* ultoa::buffer#4 buffer zp[2]:34 2000002.0
byte ultoa::digit
byte ultoa::digit#1 digit zp[1]:17 2000002.0
byte ultoa::digit#2 digit zp[1]:17 285714.5714285714
dword ultoa::digit_value
dword ultoa::digit_value#0 digit_value zp[4]:67 600000.6000000001
dword* ultoa::digit_values
byte ultoa::max_digits
byte ultoa::radix
byte ultoa::started
byte ultoa::started#2 reg byte x 500000.5
byte ultoa::started#4 reg byte x 1000001.0
dword ultoa::value
dword ultoa::value#0 value zp[4]:11 1000001.0
dword ultoa::value#1 value zp[4]:11 5501.0
dword ultoa::value#2 value zp[4]:11 572857.857142857
dword ultoa::value#6 value zp[4]:11 1500001.5
dword ultoa_append(byte* ultoa_append::buffer , dword ultoa_append::value , dword ultoa_append::sub)
byte* ultoa_append::buffer
byte* ultoa_append::buffer#0 buffer zp[2]:34 1375000.25
byte ultoa_append::digit
byte ultoa_append::digit#1 reg byte x 1.0000000001E10
byte ultoa_append::digit#2 reg byte x 1.00050000015E10
dword ultoa_append::return
dword ultoa_append::return#0 return zp[4]:11 2000002.0
dword ultoa_append::sub
dword ultoa_append::sub#0 sub zp[4]:67 3.3335000005E9
dword ultoa_append::value
dword ultoa_append::value#0 value zp[4]:11 3666667.333333333
dword ultoa_append::value#1 value zp[4]:11 2.0000000002E10
dword ultoa_append::value#2 value zp[4]:11 5.001833334166666E9
void utoa(word utoa::value , byte* utoa::buffer , byte utoa::radix)
byte~ utoa::$10 reg byte a 2000002.0
byte~ utoa::$11 reg byte a 20002.0
byte* utoa::buffer
byte* utoa::buffer#11 buffer zp[2]:34 287143.2857142857
byte* utoa::buffer#14 buffer zp[2]:34 1500001.5
byte* utoa::buffer#3 buffer zp[2]:34 20002.0
byte* utoa::buffer#4 buffer zp[2]:34 2000002.0
byte utoa::digit
byte utoa::digit#1 digit zp[1]:17 2000002.0
byte utoa::digit#2 digit zp[1]:17 285714.5714285714
word utoa::digit_value
word utoa::digit_value#0 digit_value zp[2]:71 600000.6000000001
word* utoa::digit_values
byte utoa::max_digits
byte utoa::radix
byte utoa::started
byte utoa::started#2 reg byte x 500000.5
byte utoa::started#4 reg byte x 1000001.0
word utoa::value
word utoa::value#0 value zp[2]:15 1000001.0
word utoa::value#1 value zp[2]:15 5501.0
word utoa::value#2 value zp[2]:15 572857.857142857
word utoa::value#6 value zp[2]:15 1500001.5
word utoa_append(byte* utoa_append::buffer , word utoa_append::value , word utoa_append::sub)
byte* utoa_append::buffer
byte* utoa_append::buffer#0 buffer zp[2]:34 1375000.25
byte utoa_append::digit
byte utoa_append::digit#1 reg byte x 1.0000000001E10
byte utoa_append::digit#2 reg byte x 1.00050000015E10
word utoa_append::return
word utoa_append::return#0 return zp[2]:15 2000002.0
word utoa_append::sub
word utoa_append::sub#0 sub zp[2]:71 3.3335000005E9
word utoa_append::value
word utoa_append::value#0 value zp[2]:15 3666667.333333333
word utoa_append::value#1 value zp[2]:15 2.0000000002E10
word utoa_append::value#2 value zp[2]:15 5.001833334166666E9
const byte* vera_layer_backcolor[2] = { BLUE, BLUE }
const byte** vera_layer_config[2] = { VERA_L0_CONFIG, VERA_L1_CONFIG }
byte vera_layer_get_color(byte vera_layer_get_color::layer)
byte~ vera_layer_get_color::$0 reg byte a 2.0000000000002E13
byte~ vera_layer_get_color::$1 reg byte a 2.0000000000002E13
byte~ vera_layer_get_color::$3 reg byte a 2.0000000000002E13
byte* vera_layer_get_color::addr
byte* vera_layer_get_color::addr#0 addr zp[2]:77 2.0000000000002E13
byte vera_layer_get_color::layer
byte vera_layer_get_color::layer#0 reg byte x 2.00000002E8
byte vera_layer_get_color::layer#1 reg byte x 2.000000000002E12
byte vera_layer_get_color::layer#2 reg byte x 6.833350000000999E12
byte vera_layer_get_color::return
byte vera_layer_get_color::return#0 reg byte a 2.0000000000002E13
byte vera_layer_get_color::return#1 reg byte a 2.0000000000002E13
byte vera_layer_get_color::return#2 reg byte a 5.250025000001E12
byte vera_layer_get_color::return#3 reg byte a 2.00000002E8
byte vera_layer_get_color::return#4 reg byte a 2.000000000002E12
byte vera_layer_get_mapbase_bank(byte vera_layer_get_mapbase_bank::layer)
byte vera_layer_get_mapbase_bank::layer
byte vera_layer_get_mapbase_bank::layer#0 reg byte x 1102.0
byte vera_layer_get_mapbase_bank::return
byte vera_layer_get_mapbase_bank::return#0 reg byte a 367.33333333333337
byte vera_layer_get_mapbase_bank::return#2 reg byte a 202.0
word vera_layer_get_mapbase_offset(byte vera_layer_get_mapbase_offset::layer)
byte~ vera_layer_get_mapbase_offset::$0 reg byte a 2002.0
byte vera_layer_get_mapbase_offset::layer
byte vera_layer_get_mapbase_offset::layer#0 reg byte a 1102.0
word vera_layer_get_mapbase_offset::return
word vera_layer_get_mapbase_offset::return#0 return zp[2]:75 367.33333333333337
word vera_layer_get_mapbase_offset::return#2 return zp[2]:75 202.0
byte vera_layer_get_rowshift(byte vera_layer_get_rowshift::layer)
byte vera_layer_get_rowshift::layer
byte vera_layer_get_rowshift::layer#0 reg byte x 1102.0
byte vera_layer_get_rowshift::return
byte vera_layer_get_rowshift::return#0 reg byte a 367.33333333333337
byte vera_layer_get_rowshift::return#2 reg byte a 202.0
word vera_layer_get_rowskip(byte vera_layer_get_rowskip::layer)
byte~ vera_layer_get_rowskip::$0 reg byte a 2002.0
byte vera_layer_get_rowskip::layer
byte vera_layer_get_rowskip::layer#0 reg byte a 1102.0
word vera_layer_get_rowskip::return
word vera_layer_get_rowskip::return#0 return zp[2]:61 367.33333333333337
word vera_layer_get_rowskip::return#2 return zp[2]:61 202.0
const byte** vera_layer_mapbase[2] = { VERA_L0_MAPBASE, VERA_L1_MAPBASE }
void vera_layer_mode_text(byte vera_layer_mode_text::layer , dword vera_layer_mode_text::mapbase_address , dword vera_layer_mode_text::tilebase_address , word vera_layer_mode_text::mapwidth , word vera_layer_mode_text::mapheight , byte vera_layer_mode_text::tilewidth , byte vera_layer_mode_text::tileheight , word vera_layer_mode_text::color_mode)
word vera_layer_mode_text::color_mode
byte vera_layer_mode_text::layer
const byte vera_layer_mode_text::layer#0 layer = 1
dword vera_layer_mode_text::mapbase_address
const dword vera_layer_mode_text::mapbase_address#0 mapbase_address = 0
word vera_layer_mode_text::mapheight
word vera_layer_mode_text::mapwidth
dword vera_layer_mode_text::tilebase_address
const dword vera_layer_mode_text::tilebase_address#0 tilebase_address = $f800
byte vera_layer_mode_text::tileheight
byte vera_layer_mode_text::tilewidth
void vera_layer_mode_tile(byte vera_layer_mode_tile::layer , dword vera_layer_mode_tile::mapbase_address , dword vera_layer_mode_tile::tilebase_address , word vera_layer_mode_tile::mapwidth , word vera_layer_mode_tile::mapheight , byte vera_layer_mode_tile::tilewidth , byte vera_layer_mode_tile::tileheight , byte vera_layer_mode_tile::color_depth)
byte vera_layer_mode_tile::color_depth
byte vera_layer_mode_tile::config
const byte vera_layer_mode_tile::config#10 config = VERA_LAYER_WIDTH_128|VERA_LAYER_HEIGHT_64
byte vera_layer_mode_tile::layer
byte vera_layer_mode_tile::mapbase
const byte vera_layer_mode_tile::mapbase#0 mapbase = 0
dword vera_layer_mode_tile::mapbase_address
word vera_layer_mode_tile::mapheight
word vera_layer_mode_tile::mapwidth
byte vera_layer_mode_tile::tilebase
dword vera_layer_mode_tile::tilebase_address
const dword vera_layer_mode_tile::tilebase_address#0 tilebase_address = vera_layer_mode_text::tilebase_address#0>>1
byte vera_layer_mode_tile::tileheight
byte vera_layer_mode_tile::tilewidth
const byte* vera_layer_rowshift[2] = { 0, 0 }
const word* vera_layer_rowskip[2] = { 0, 0 }
byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color)
byte vera_layer_set_backcolor::color
byte vera_layer_set_backcolor::layer
const byte vera_layer_set_backcolor::layer#0 layer = 1
byte vera_layer_set_backcolor::old
byte vera_layer_set_backcolor::return
void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config)
byte* vera_layer_set_config::addr
byte* vera_layer_set_config::addr#0 addr zp[2]:73 20002.0
byte vera_layer_set_config::config
byte vera_layer_set_config::layer
void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase)
byte~ vera_layer_set_mapbase::$0 reg byte a 20002.0
byte* vera_layer_set_mapbase::addr
byte* vera_layer_set_mapbase::addr#0 addr zp[2]:59 20002.0
byte vera_layer_set_mapbase::layer
byte vera_layer_set_mapbase::layer#3 reg byte a 10001.0
byte vera_layer_set_mapbase::mapbase
byte vera_layer_set_mapbase::mapbase#3 reg byte x 3333.6666666666665
void vera_layer_set_text_color_mode(byte vera_layer_set_text_color_mode::layer , byte vera_layer_set_text_color_mode::color_mode)
byte* vera_layer_set_text_color_mode::addr
byte* vera_layer_set_text_color_mode::addr#0 addr zp[2]:63 2502.5
byte vera_layer_set_text_color_mode::color_mode
byte vera_layer_set_text_color_mode::layer
byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color)
byte vera_layer_set_textcolor::color
byte vera_layer_set_textcolor::layer
const byte vera_layer_set_textcolor::layer#0 layer = 1
byte vera_layer_set_textcolor::old
byte vera_layer_set_textcolor::return
void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase)
byte* vera_layer_set_tilebase::addr
byte* vera_layer_set_tilebase::addr#0 addr zp[2]:75 20002.0
byte vera_layer_set_tilebase::layer
byte vera_layer_set_tilebase::tilebase
const byte* vera_layer_textcolor[2] = { WHITE, WHITE }
const byte** vera_layer_tilebase[2] = { VERA_L0_TILEBASE, VERA_L1_TILEBASE }
const dword* vera_mapbase_address[2] = { 0, 0 }
const byte* vera_mapbase_bank[2] = { 0, 0 }
const word* vera_mapbase_offset[2] = { 0, 0 }
const dword* vera_tilebase_address[2] = { 0, 0 }
const byte* vera_tilebase_bank[2] = { 0, 0 }
const word* vera_tilebase_offset[2] = { 0, 0 }
zp[1]:2 [ conio_x16_init::line#3 conio_x16_init::line#1 conio_x16_init::line#0 ]
zp[4]:3 [ main::src1#10 main::src1#1 ]
zp[4]:7 [ main::num#10 main::num#1 ]
reg byte a [ vera_layer_set_mapbase::layer#3 ]
reg byte x [ vera_layer_set_mapbase::mapbase#3 ]
reg byte x [ gotoxy::y#4 gotoxy::y#3 gotoxy::y#0 gotoxy::y#2 ]
zp[4]:11 [ printf_ulong::uvalue#3 printf_ulong::uvalue#0 printf_ulong::uvalue#1 printf_ulong::uvalue#2 ultoa::value#2 ultoa::value#6 ultoa::value#1 ultoa::value#0 ultoa_append::value#2 ultoa_append::value#0 ultoa_append::value#1 ultoa_append::return#0 ]
reg byte x [ printf_uchar::uvalue#2 printf_uchar::uvalue#1 printf_uchar::uvalue#0 ]
zp[2]:15 [ printf_uint::uvalue#2 printf_uint::uvalue#0 printf_uint::uvalue#1 utoa::value#2 utoa::value#6 utoa::value#1 utoa::value#0 main::beg#1 utoa_append::value#2 utoa_append::value#0 utoa_append::value#1 utoa_append::return#0 main::$25 main::beg#0 ]
reg byte x [ ultoa::started#2 ultoa::started#4 ]
reg byte a [ printf_number_buffer::buffer_sign#10 printf_number_buffer::buffer_sign#2 printf_number_buffer::buffer_sign#1 printf_number_buffer::buffer_sign#0 ]
reg byte x [ uctoa::value#2 uctoa::value#6 uctoa::value#1 uctoa::value#0 ]
zp[1]:17 [ utoa::digit#2 utoa::digit#1 uctoa::digit#2 uctoa::digit#1 ultoa::digit#2 ultoa::digit#1 cputc::c#3 cputc::c#0 cputc::c#2 ]
reg byte x [ utoa::started#2 utoa::started#4 ]
reg byte x [ vera_layer_get_color::layer#2 vera_layer_get_color::layer#1 vera_layer_get_color::layer#0 ]
reg byte a [ vera_layer_get_color::return#2 vera_layer_get_color::return#0 vera_layer_get_color::return#1 ]
reg byte x [ ultoa_append::digit#2 ultoa_append::digit#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 [ utoa_append::digit#2 utoa_append::digit#1 ]
reg byte x [ insertup::i#2 insertup::i#1 ]
zp[1]:18 [ conio_screen_width ]
zp[1]:19 [ conio_screen_height ]
zp[1]:20 [ conio_screen_layer ]
zp[2]:21 [ conio_width ]
zp[2]:23 [ conio_height ]
zp[1]:25 [ conio_rowshift ]
zp[2]:26 [ conio_rowskip ]
zp[4]:28 [ main::$1 main::calcend#0 ]
zp[2]:32 [ main::$3 main::$4 memcpy_in_vram::i#2 memcpy_in_vram::i#1 clearline::c#2 clearline::c#1 ]
reg byte y [ main::$5 ]
zp[2]:34 [ main::$6 utoa::buffer#11 utoa::buffer#14 utoa::buffer#4 utoa::buffer#3 utoa_append::buffer#0 uctoa::buffer#11 uctoa::buffer#14 uctoa::buffer#4 uctoa::buffer#3 uctoa_append::buffer#0 ultoa::buffer#11 ultoa::buffer#14 ultoa::buffer#4 ultoa::buffer#3 ultoa_append::buffer#0 cputs::s#10 cputs::s#11 cputs::s#0 ]
reg byte x [ main::$7 ]
zp[2]:36 [ main::$30 main::$8 main::$9 main::$13 ]
zp[2]:38 [ main::$10 main::$11 ]
reg byte a [ main::$12 ]
zp[2]:40 [ main::$31 ]
zp[1]:42 [ main::bankbeg#0 uctoa::started#2 uctoa::started#4 ]
zp[2]:43 [ main::$14 main::$15 ]
reg byte y [ main::$16 ]
zp[2]:45 [ main::$17 ]
reg byte x [ main::$18 ]
zp[2]:47 [ main::$32 main::$19 main::$20 main::$24 ]
zp[2]:49 [ main::$21 main::$22 ]
reg byte a [ main::$23 ]
zp[2]:51 [ main::$33 ]
zp[1]:53 [ main::bankend#0 ]
zp[2]:54 [ main::$27 main::end#0 main::end#1 ]
reg byte a [ screensize::hscale#0 ]
reg byte a [ screensize::$1 ]
reg byte a [ screensize::vscale#0 ]
reg byte a [ screensize::$3 ]
reg byte x [ vera_layer_get_mapbase_bank::layer#0 ]
reg byte a [ vera_layer_get_mapbase_bank::return#2 ]
zp[1]:56 [ CONIO_SCREEN_BANK#10 ]
reg byte a [ vera_layer_get_mapbase_offset::layer#0 ]
zp[2]:57 [ CONIO_SCREEN_TEXT#101 ]
reg byte a [ screenlayer::vera_layer_get_width1_layer#0 ]
reg byte a [ screenlayer::vera_layer_get_width1_$2 ]
reg byte a [ screenlayer::vera_layer_get_width1_$0 ]
reg byte a [ screenlayer::vera_layer_get_width1_$1 ]
reg byte a [ screenlayer::vera_layer_get_width1_$3 ]
reg byte x [ vera_layer_get_rowshift::layer#0 ]
reg byte a [ vera_layer_get_rowshift::return#2 ]
reg byte a [ screenlayer::$3 ]
reg byte a [ vera_layer_get_rowskip::layer#0 ]
reg byte a [ screenlayer::vera_layer_get_height1_layer#0 ]
reg byte a [ screenlayer::vera_layer_get_height1_$2 ]
reg byte a [ screenlayer::vera_layer_get_height1_$0 ]
reg byte a [ screenlayer::vera_layer_get_height1_$1 ]
reg byte a [ screenlayer::vera_layer_get_height1_$3 ]
reg byte a [ vera_layer_set_mapbase::$0 ]
zp[2]:59 [ vera_layer_set_mapbase::addr#0 screenlayer::vera_layer_get_width1_return#0 screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 ]
zp[2]:61 [ gotoxy::$6 gotoxy::line_offset#0 vera_layer_get_rowskip::return#2 screenlayer::$4 vera_layer_get_rowskip::return#0 ]
reg byte a [ gotoxy::$5 ]
reg byte a [ cputs::c#1 ]
zp[2]:63 [ vera_layer_set_text_color_mode::addr#0 screenlayer::vera_layer_get_height1_config#0 ]
reg byte a [ vera_layer_get_mapbase_bank::return#0 ]
reg byte a [ vera_layer_get_mapbase_offset::$0 ]
reg byte a [ vera_layer_get_rowshift::return#0 ]
reg byte a [ vera_layer_get_rowskip::$0 ]
reg byte a [ vera_layer_get_color::return#3 ]
reg byte x [ cputc::color#0 ]
reg byte a [ cputc::$15 ]
reg byte a [ cputc::$2 ]
reg byte a [ cputc::$4 ]
reg byte a [ cputc::$5 ]
reg byte a [ cputc::$6 ]
reg byte a [ cputc::scroll_enable#0 ]
zp[2]:65 [ cputc::$16 ]
reg byte a [ ultoa::$11 ]
reg byte a [ ultoa::$10 ]
zp[4]:67 [ ultoa::digit_value#0 ultoa_append::sub#0 ]
reg byte x [ uctoa_append::return#0 ]
reg byte a [ utoa::$11 ]
reg byte a [ utoa::$10 ]
zp[2]:71 [ utoa::digit_value#0 utoa_append::sub#0 cputc::conio_addr#0 cputc::conio_addr#1 ]
zp[2]:73 [ vera_layer_set_config::addr#0 screenlayer::vera_layer_get_height1_return#0 screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 ]
zp[2]:75 [ vera_layer_set_tilebase::addr#0 screenlayer::vera_layer_get_width1_config#0 vera_layer_get_mapbase_offset::return#2 vera_layer_get_mapbase_offset::return#0 ]
reg byte a [ vera_layer_get_color::$3 ]
reg byte a [ vera_layer_get_color::$0 ]
reg byte a [ vera_layer_get_color::$1 ]
reg byte a [ cputln::$2 ]
zp[2]:77 [ cputln::temp#0 cputln::temp#1 vera_layer_get_color::addr#0 ]
reg byte a [ cputln::$3 ]
zp[1]:79 [ insertup::cy#0 uctoa::digit_value#0 uctoa_append::sub#0 ]
zp[1]:80 [ insertup::width#0 ]
reg byte a [ insertup::$3 ]
zp[2]:81 [ insertup::line#0 insertup::start#0 memcpy_in_vram::dest#0 ]
zp[2]:83 [ memcpy_in_vram::num#0 ]
reg byte a [ clearline::$5 ]
zp[2]:85 [ clearline::addr#0 memcpy_in_vram::src#0 ]
reg byte a [ clearline::$1 ]
reg byte a [ clearline::$2 ]
reg byte a [ vera_layer_get_color::return#4 ]
reg byte x [ clearline::color#0 ]
reg byte a [ memcpy_in_vram::$0 ]
reg byte a [ memcpy_in_vram::$1 ]
reg byte a [ memcpy_in_vram::$3 ]
reg byte a [ memcpy_in_vram::$4 ]
mem[12] [ printf_buffer ]

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,788 @@
void __start()
__start: scope:[__start] from
[0] phi()
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] conio_screen_width = 0
[2] conio_screen_height = 0
[3] conio_screen_layer = 1
[4] conio_width = 0
[5] conio_height = 0
[6] conio_rowshift = 0
[7] conio_rowskip = 0
[8] call conio_x16_init
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[9] phi()
[10] call main
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[11] return
to:@return
void conio_x16_init()
conio_x16_init: scope:[conio_x16_init] from __start::__init1
[12] conio_x16_init::line#0 = *conio_x16_init::BASIC_CURSOR_LINE
[13] call vera_layer_mode_text
to:conio_x16_init::@3
conio_x16_init::@3: scope:[conio_x16_init] from conio_x16_init
[14] phi()
[15] call screensize
to:conio_x16_init::@4
conio_x16_init::@4: scope:[conio_x16_init] from conio_x16_init::@3
[16] phi()
[17] call screenlayer
to:conio_x16_init::@5
conio_x16_init::@5: scope:[conio_x16_init] from conio_x16_init::@4
[18] phi()
[19] call vera_layer_set_textcolor
to:conio_x16_init::@6
conio_x16_init::@6: scope:[conio_x16_init] from conio_x16_init::@5
[20] phi()
[21] call vera_layer_set_backcolor
to:conio_x16_init::@7
conio_x16_init::@7: scope:[conio_x16_init] from conio_x16_init::@6
[22] phi()
[23] call vera_layer_set_mapbase
to:conio_x16_init::@8
conio_x16_init::@8: scope:[conio_x16_init] from conio_x16_init::@7
[24] phi()
[25] call vera_layer_set_mapbase
to:conio_x16_init::@9
conio_x16_init::@9: scope:[conio_x16_init] from conio_x16_init::@8
[26] if(conio_x16_init::line#0<conio_screen_height) goto conio_x16_init::@1
to:conio_x16_init::@2
conio_x16_init::@2: scope:[conio_x16_init] from conio_x16_init::@9
[27] conio_x16_init::line#1 = conio_screen_height - 1
to:conio_x16_init::@1
conio_x16_init::@1: scope:[conio_x16_init] from conio_x16_init::@2 conio_x16_init::@9
[28] conio_x16_init::line#3 = phi( conio_x16_init::@2/conio_x16_init::line#1, conio_x16_init::@9/conio_x16_init::line#0 )
[29] gotoxy::y#0 = conio_x16_init::line#3
[30] call gotoxy
to:conio_x16_init::@return
conio_x16_init::@return: scope:[conio_x16_init] from conio_x16_init::@1
[31] return
to:@return
void main()
main: scope:[main] from __start::@1
[32] phi()
[33] call vera_layer_set_text_color_mode
to:main::@1
main::@1: scope:[main] from main
[34] phi()
[35] call screenlayer
to:main::@2
main::@2: scope:[main] from main::@1
[36] phi()
[37] call clrscr
to:main::@3
main::@3: scope:[main] from main::@2
[38] phi()
[39] call cputs
to:main::@4
main::@4: scope:[main] from main::@3
[40] *(&main::SPRITE_ATTR) = memcpy(*(&$0), struct VERA_SPRITE, SIZEOF_STRUCT_VERA_SPRITE)
[41] call LoadFileBanked
to:main::@5
main::@5: scope:[main] from main::@4
[42] phi()
[43] call bnkcpy_vram_address
to:main::@6
main::@6: scope:[main] from main::@5
[44] phi()
[45] call bnkcpy_vram_address
to:main::@7
main::@7: scope:[main] from main::@6
[46] *((word*)&main::SPRITE_ATTR) = <main::VRAM_SPRITE/$20
[47] *((word*)&main::SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_X) = $64
[48] *((word*)&main::SPRITE_ATTR+OFFSET_STRUCT_VERA_SPRITE_Y) = $64
[49] call memcpy_to_vram
to:main::@8
main::@8: scope:[main] from main::@7
[50] *VERA_CTRL = *VERA_CTRL & ~VERA_DCSEL
[51] *VERA_DC_VIDEO = *VERA_DC_VIDEO | VERA_SPRITES_ENABLE
to:main::@return
main::@return: scope:[main] from main::@8
[52] return
to:@return
void vera_layer_mode_text(byte vera_layer_mode_text::layer , dword vera_layer_mode_text::mapbase_address , dword vera_layer_mode_text::tilebase_address , word vera_layer_mode_text::mapwidth , word vera_layer_mode_text::mapheight , byte vera_layer_mode_text::tilewidth , byte vera_layer_mode_text::tileheight , word vera_layer_mode_text::color_mode)
vera_layer_mode_text: scope:[vera_layer_mode_text] from conio_x16_init
[53] phi()
[54] call vera_layer_mode_tile
to:vera_layer_mode_text::@1
vera_layer_mode_text::@1: scope:[vera_layer_mode_text] from vera_layer_mode_text
[55] phi()
[56] call vera_layer_set_text_color_mode
to:vera_layer_mode_text::@return
vera_layer_mode_text::@return: scope:[vera_layer_mode_text] from vera_layer_mode_text::@1
[57] return
to:@return
void screensize(byte* screensize::x , byte* screensize::y)
screensize: scope:[screensize] from conio_x16_init::@3
[58] screensize::hscale#0 = *VERA_DC_HSCALE >> 7
[59] screensize::$1 = $28 << screensize::hscale#0
[60] *screensize::x#0 = screensize::$1
[61] screensize::vscale#0 = *VERA_DC_VSCALE >> 7
[62] screensize::$3 = $1e << screensize::vscale#0
[63] *screensize::y#0 = screensize::$3
to:screensize::@return
screensize::@return: scope:[screensize] from screensize
[64] return
to:@return
void screenlayer(byte screenlayer::layer)
screenlayer: scope:[screenlayer] from conio_x16_init::@4 main::@1
[65] conio_screen_layer = 1
[66] vera_layer_get_mapbase_bank::layer#0 = conio_screen_layer
[67] call vera_layer_get_mapbase_bank
[68] vera_layer_get_mapbase_bank::return#2 = vera_layer_get_mapbase_bank::return#0
to:screenlayer::@3
screenlayer::@3: scope:[screenlayer] from screenlayer
[69] CONIO_SCREEN_BANK#14 = vera_layer_get_mapbase_bank::return#2
[70] vera_layer_get_mapbase_offset::layer#0 = conio_screen_layer
[71] call vera_layer_get_mapbase_offset
[72] vera_layer_get_mapbase_offset::return#2 = vera_layer_get_mapbase_offset::return#0
to:screenlayer::@4
screenlayer::@4: scope:[screenlayer] from screenlayer::@3
[73] CONIO_SCREEN_TEXT#16 = vera_layer_get_mapbase_offset::return#2
[74] screenlayer::vera_layer_get_width1_layer#0 = conio_screen_layer
to:screenlayer::vera_layer_get_width1
screenlayer::vera_layer_get_width1: scope:[screenlayer] from screenlayer::@4
[75] screenlayer::vera_layer_get_width1_$2 = screenlayer::vera_layer_get_width1_layer#0 << 1
[76] screenlayer::vera_layer_get_width1_config#0 = vera_layer_config[screenlayer::vera_layer_get_width1_$2]
[77] screenlayer::vera_layer_get_width1_$0 = *screenlayer::vera_layer_get_width1_config#0 & VERA_LAYER_WIDTH_MASK
[78] screenlayer::vera_layer_get_width1_$1 = screenlayer::vera_layer_get_width1_$0 >> 4
[79] screenlayer::vera_layer_get_width1_$3 = screenlayer::vera_layer_get_width1_$1 << 1
[80] screenlayer::vera_layer_get_width1_return#0 = VERA_LAYER_WIDTH[screenlayer::vera_layer_get_width1_$3]
to:screenlayer::vera_layer_get_width1_@return
screenlayer::vera_layer_get_width1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_width1
[81] screenlayer::vera_layer_get_width1_return#1 = screenlayer::vera_layer_get_width1_return#0
to:screenlayer::@1
screenlayer::@1: scope:[screenlayer] from screenlayer::vera_layer_get_width1_@return
[82] screenlayer::$2 = screenlayer::vera_layer_get_width1_return#1
[83] conio_width = screenlayer::$2
[84] vera_layer_get_rowshift::layer#0 = conio_screen_layer
[85] call vera_layer_get_rowshift
[86] vera_layer_get_rowshift::return#2 = vera_layer_get_rowshift::return#0
to:screenlayer::@5
screenlayer::@5: scope:[screenlayer] from screenlayer::@1
[87] screenlayer::$3 = vera_layer_get_rowshift::return#2
[88] conio_rowshift = screenlayer::$3
[89] vera_layer_get_rowskip::layer#0 = conio_screen_layer
[90] call vera_layer_get_rowskip
[91] vera_layer_get_rowskip::return#2 = vera_layer_get_rowskip::return#0
to:screenlayer::@6
screenlayer::@6: scope:[screenlayer] from screenlayer::@5
[92] screenlayer::$4 = vera_layer_get_rowskip::return#2
[93] conio_rowskip = screenlayer::$4
[94] screenlayer::vera_layer_get_height1_layer#0 = conio_screen_layer
to:screenlayer::vera_layer_get_height1
screenlayer::vera_layer_get_height1: scope:[screenlayer] from screenlayer::@6
[95] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 << 1
[96] screenlayer::vera_layer_get_height1_config#0 = vera_layer_config[screenlayer::vera_layer_get_height1_$2]
[97] screenlayer::vera_layer_get_height1_$0 = *screenlayer::vera_layer_get_height1_config#0 & VERA_LAYER_HEIGHT_MASK
[98] screenlayer::vera_layer_get_height1_$1 = screenlayer::vera_layer_get_height1_$0 >> 6
[99] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 << 1
[100] screenlayer::vera_layer_get_height1_return#0 = VERA_LAYER_HEIGHT[screenlayer::vera_layer_get_height1_$3]
to:screenlayer::vera_layer_get_height1_@return
screenlayer::vera_layer_get_height1_@return: scope:[screenlayer] from screenlayer::vera_layer_get_height1
[101] screenlayer::vera_layer_get_height1_return#1 = screenlayer::vera_layer_get_height1_return#0
to:screenlayer::@2
screenlayer::@2: scope:[screenlayer] from screenlayer::vera_layer_get_height1_@return
[102] screenlayer::$5 = screenlayer::vera_layer_get_height1_return#1
[103] conio_height = screenlayer::$5
to:screenlayer::@return
screenlayer::@return: scope:[screenlayer] from screenlayer::@2
[104] return
to:@return
byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color)
vera_layer_set_textcolor: scope:[vera_layer_set_textcolor] from conio_x16_init::@5
[105] *(vera_layer_textcolor+vera_layer_set_textcolor::layer#0) = WHITE
to:vera_layer_set_textcolor::@return
vera_layer_set_textcolor::@return: scope:[vera_layer_set_textcolor] from vera_layer_set_textcolor
[106] return
to:@return
byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color)
vera_layer_set_backcolor: scope:[vera_layer_set_backcolor] from conio_x16_init::@6
[107] *(vera_layer_backcolor+vera_layer_set_backcolor::layer#0) = BLUE
to:vera_layer_set_backcolor::@return
vera_layer_set_backcolor::@return: scope:[vera_layer_set_backcolor] from vera_layer_set_backcolor
[108] return
to:@return
void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase)
vera_layer_set_mapbase: scope:[vera_layer_set_mapbase] from conio_x16_init::@7 conio_x16_init::@8 vera_layer_mode_tile::@4
[109] vera_layer_set_mapbase::mapbase#3 = phi( conio_x16_init::@7/$20, conio_x16_init::@8/0, vera_layer_mode_tile::@4/vera_layer_mode_tile::mapbase#0 )
[109] vera_layer_set_mapbase::layer#3 = phi( conio_x16_init::@7/0, conio_x16_init::@8/1, vera_layer_mode_tile::@4/vera_layer_mode_text::layer#0 )
[110] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#3 << 1
[111] vera_layer_set_mapbase::addr#0 = vera_layer_mapbase[vera_layer_set_mapbase::$0]
[112] *vera_layer_set_mapbase::addr#0 = vera_layer_set_mapbase::mapbase#3
to:vera_layer_set_mapbase::@return
vera_layer_set_mapbase::@return: scope:[vera_layer_set_mapbase] from vera_layer_set_mapbase
[113] return
to:@return
void gotoxy(byte gotoxy::x , byte gotoxy::y)
gotoxy: scope:[gotoxy] from conio_x16_init::@1 cscroll::@5
[114] gotoxy::y#3 = phi( conio_x16_init::@1/gotoxy::y#0, cscroll::@5/gotoxy::y#2 )
[115] if(gotoxy::y#3<=conio_screen_height) goto gotoxy::@4
to:gotoxy::@1
gotoxy::@4: scope:[gotoxy] from gotoxy
[116] phi()
to:gotoxy::@1
gotoxy::@1: scope:[gotoxy] from gotoxy gotoxy::@4
[117] gotoxy::y#4 = phi( gotoxy::@4/gotoxy::y#3, gotoxy/0 )
[118] if(0<conio_screen_width) goto gotoxy::@2
to:gotoxy::@3
gotoxy::@3: scope:[gotoxy] from gotoxy::@1
[119] phi()
to:gotoxy::@2
gotoxy::@2: scope:[gotoxy] from gotoxy::@1 gotoxy::@3
[120] conio_cursor_x[conio_screen_layer] = 0
[121] conio_cursor_y[conio_screen_layer] = gotoxy::y#4
[122] gotoxy::$6 = (word)gotoxy::y#4
[123] gotoxy::line_offset#0 = gotoxy::$6 << conio_rowshift
[124] gotoxy::$5 = conio_screen_layer << 1
[125] conio_line_text[gotoxy::$5] = gotoxy::line_offset#0
to:gotoxy::@return
gotoxy::@return: scope:[gotoxy] from gotoxy::@2
[126] return
to:@return
void vera_layer_set_text_color_mode(byte vera_layer_set_text_color_mode::layer , byte vera_layer_set_text_color_mode::color_mode)
vera_layer_set_text_color_mode: scope:[vera_layer_set_text_color_mode] from main vera_layer_mode_text::@1
[127] vera_layer_set_text_color_mode::layer#3 = phi( main/1, vera_layer_mode_text::@1/vera_layer_mode_text::layer#0 )
[128] vera_layer_set_text_color_mode::$0 = vera_layer_set_text_color_mode::layer#3 << 1
[129] vera_layer_set_text_color_mode::addr#0 = vera_layer_config[vera_layer_set_text_color_mode::$0]
[130] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 & ~VERA_LAYER_CONFIG_256C
[131] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0
to:vera_layer_set_text_color_mode::@return
vera_layer_set_text_color_mode::@return: scope:[vera_layer_set_text_color_mode] from vera_layer_set_text_color_mode
[132] return
to:@return
void clrscr()
clrscr: scope:[clrscr] from main::@2
[133] clrscr::line_text#0 = (byte*)CONIO_SCREEN_TEXT#16
[134] vera_layer_get_backcolor::layer#0 = conio_screen_layer
[135] call vera_layer_get_backcolor
[136] vera_layer_get_backcolor::return#2 = vera_layer_get_backcolor::return#0
to:clrscr::@7
clrscr::@7: scope:[clrscr] from clrscr
[137] clrscr::$0 = vera_layer_get_backcolor::return#2
[138] clrscr::$1 = clrscr::$0 << 4
[139] vera_layer_get_textcolor::layer#0 = conio_screen_layer
[140] call vera_layer_get_textcolor
[141] vera_layer_get_textcolor::return#2 = vera_layer_get_textcolor::return#0
to:clrscr::@8
clrscr::@8: scope:[clrscr] from clrscr::@7
[142] clrscr::$2 = vera_layer_get_textcolor::return#2
[143] clrscr::color#0 = clrscr::$1 | clrscr::$2
to:clrscr::@1
clrscr::@1: scope:[clrscr] from clrscr::@6 clrscr::@8
[144] clrscr::line_text#2 = phi( clrscr::@6/clrscr::line_text#1, clrscr::@8/clrscr::line_text#0 )
[144] clrscr::l#2 = phi( clrscr::@6/clrscr::l#1, clrscr::@8/0 )
[145] if(clrscr::l#2<conio_height) goto clrscr::@2
to:clrscr::@3
clrscr::@3: scope:[clrscr] from clrscr::@1
[146] conio_cursor_x[conio_screen_layer] = 0
[147] conio_cursor_y[conio_screen_layer] = 0
[148] clrscr::$9 = conio_screen_layer << 1
[149] conio_line_text[clrscr::$9] = 0
to:clrscr::@return
clrscr::@return: scope:[clrscr] from clrscr::@3
[150] return
to:@return
clrscr::@2: scope:[clrscr] from clrscr::@1
[151] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[152] clrscr::$5 = < clrscr::line_text#2
[153] *VERA_ADDRX_L = clrscr::$5
[154] clrscr::$6 = > clrscr::line_text#2
[155] *VERA_ADDRX_M = clrscr::$6
[156] clrscr::$7 = CONIO_SCREEN_BANK#14 | VERA_INC_1
[157] *VERA_ADDRX_H = clrscr::$7
to:clrscr::@4
clrscr::@4: scope:[clrscr] from clrscr::@2 clrscr::@5
[158] clrscr::c#2 = phi( clrscr::@2/0, clrscr::@5/clrscr::c#1 )
[159] if(clrscr::c#2<conio_width) goto clrscr::@5
to:clrscr::@6
clrscr::@6: scope:[clrscr] from clrscr::@4
[160] clrscr::line_text#1 = clrscr::line_text#2 + conio_rowskip
[161] clrscr::l#1 = ++ clrscr::l#2
to:clrscr::@1
clrscr::@5: scope:[clrscr] from clrscr::@4
[162] *VERA_DATA0 = ' '
[163] *VERA_DATA0 = clrscr::color#0
[164] clrscr::c#1 = ++ clrscr::c#2
to:clrscr::@4
void cputs(to_nomodify byte* cputs::s)
cputs: scope:[cputs] from main::@3
[165] phi()
to:cputs::@1
cputs::@1: scope:[cputs] from cputs cputs::@2
[166] cputs::s#2 = phi( cputs/main::s, cputs::@2/cputs::s#0 )
[167] cputs::c#1 = *cputs::s#2
[168] cputs::s#0 = ++ cputs::s#2
[169] if(0!=cputs::c#1) goto cputs::@2
to:cputs::@return
cputs::@return: scope:[cputs] from cputs::@1
[170] return
to:@return
cputs::@2: scope:[cputs] from cputs::@1
[171] cputc::c#0 = cputs::c#1
[172] call cputc
to:cputs::@1
byte LoadFileBanked(byte LoadFileBanked::device , byte* LoadFileBanked::filename , dword LoadFileBanked::address)
LoadFileBanked: scope:[LoadFileBanked] from main::@4
[173] setnam::filename = main::filename
[174] call setnam
to:LoadFileBanked::@1
LoadFileBanked::@1: scope:[LoadFileBanked] from LoadFileBanked
[175] setlfs::device = LoadFileBanked::device#0
[176] call setlfs
to:LoadFileBanked::@2
LoadFileBanked::@2: scope:[LoadFileBanked] from LoadFileBanked::@1
[177] *((byte*)VIA1+OFFSET_STRUCT_MOS6522_VIA_PORT_A) = LoadFileBanked::bank#0
[178] load::address = (byte*)0+$a000
[179] load::verify = 0
[180] call load
to:LoadFileBanked::@return
LoadFileBanked::@return: scope:[LoadFileBanked] from LoadFileBanked::@2
[181] return
to:@return
void bnkcpy_vram_address(dword bnkcpy_vram_address::vdest , dword bnkcpy_vram_address::src , dword bnkcpy_vram_address::num)
bnkcpy_vram_address: scope:[bnkcpy_vram_address] from main::@5 main::@6
[182] bnkcpy_vram_address::num#2 = phi( main::@5/$20, main::@6/(word)$40*$20 )
[182] bnkcpy_vram_address::beg#0 = phi( main::@5/main::BANK_SPRITE-2, main::@6/main::BANK_SPRITE+$20-2 )
[182] bnkcpy_vram_address::vdest#2 = phi( main::@5/VERA_PALETTE+$20, main::@6/main::VRAM_SPRITE )
[183] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[184] bnkcpy_vram_address::$0 = < bnkcpy_vram_address::vdest#2
[185] bnkcpy_vram_address::$1 = < bnkcpy_vram_address::$0
[186] *VERA_ADDRX_L = bnkcpy_vram_address::$1
[187] bnkcpy_vram_address::$2 = < bnkcpy_vram_address::vdest#2
[188] bnkcpy_vram_address::$3 = > bnkcpy_vram_address::$2
[189] *VERA_ADDRX_M = bnkcpy_vram_address::$3
[190] bnkcpy_vram_address::$4 = > bnkcpy_vram_address::vdest#2
[191] bnkcpy_vram_address::$5 = < bnkcpy_vram_address::$4
[192] *VERA_ADDRX_H = bnkcpy_vram_address::$5
[193] *VERA_ADDRX_H = *VERA_ADDRX_H | VERA_INC_1
[194] bnkcpy_vram_address::end#0 = bnkcpy_vram_address::beg#0 + bnkcpy_vram_address::num#2
[195] bnkcpy_vram_address::$7 = > bnkcpy_vram_address::beg#0
[196] bnkcpy_vram_address::$8 = bnkcpy_vram_address::$7 << 8
[197] bnkcpy_vram_address::$9 = < bnkcpy_vram_address::$8
[198] bnkcpy_vram_address::$10 = < bnkcpy_vram_address::beg#0
[199] bnkcpy_vram_address::$11 = > bnkcpy_vram_address::$10
[200] bnkcpy_vram_address::$23 = (word)bnkcpy_vram_address::$9
[201] bnkcpy_vram_address::$12 = bnkcpy_vram_address::$23 | bnkcpy_vram_address::$11
[202] bnkcpy_vram_address::$13 = bnkcpy_vram_address::$12 >> 5
[203] bnkcpy_vram_address::$14 = > bnkcpy_vram_address::beg#0
[204] bnkcpy_vram_address::$15 = bnkcpy_vram_address::$14 << 3
[205] bnkcpy_vram_address::$16 = < bnkcpy_vram_address::$15
[206] bnkcpy_vram_address::$24 = (word)bnkcpy_vram_address::$16
[207] bnkcpy_vram_address::$17 = bnkcpy_vram_address::$13 + bnkcpy_vram_address::$24
[208] bnkcpy_vram_address::bank#0 = (byte)bnkcpy_vram_address::$17
[209] bnkcpy_vram_address::$18 = < bnkcpy_vram_address::beg#0
[210] bnkcpy_vram_address::addr#0 = bnkcpy_vram_address::$18 & $1fff
[211] bnkcpy_vram_address::addr#1 = (byte*)bnkcpy_vram_address::addr#0 + $a000
[212] *((byte*) 40801) = bnkcpy_vram_address::bank#0
to:bnkcpy_vram_address::@1
bnkcpy_vram_address::@1: scope:[bnkcpy_vram_address] from bnkcpy_vram_address bnkcpy_vram_address::@3
[213] bnkcpy_vram_address::bank#2 = phi( bnkcpy_vram_address/bnkcpy_vram_address::bank#0, bnkcpy_vram_address::@3/bnkcpy_vram_address::bank#5 )
[213] bnkcpy_vram_address::addr#4 = phi( bnkcpy_vram_address/bnkcpy_vram_address::addr#1, bnkcpy_vram_address::@3/bnkcpy_vram_address::addr#2 )
[213] bnkcpy_vram_address::pos#2 = phi( bnkcpy_vram_address/bnkcpy_vram_address::beg#0, bnkcpy_vram_address::@3/bnkcpy_vram_address::pos#1 )
[214] if(bnkcpy_vram_address::pos#2<bnkcpy_vram_address::end#0) goto bnkcpy_vram_address::@2
to:bnkcpy_vram_address::@return
bnkcpy_vram_address::@return: scope:[bnkcpy_vram_address] from bnkcpy_vram_address::@1
[215] return
to:@return
bnkcpy_vram_address::@2: scope:[bnkcpy_vram_address] from bnkcpy_vram_address::@1
[216] if(bnkcpy_vram_address::addr#4!=$c000) goto bnkcpy_vram_address::@3
to:bnkcpy_vram_address::@4
bnkcpy_vram_address::@4: scope:[bnkcpy_vram_address] from bnkcpy_vram_address::@2
[217] bnkcpy_vram_address::bank#1 = ++ bnkcpy_vram_address::bank#2
[218] *((byte*) 40801) = bnkcpy_vram_address::bank#1
to:bnkcpy_vram_address::@3
bnkcpy_vram_address::@3: scope:[bnkcpy_vram_address] from bnkcpy_vram_address::@2 bnkcpy_vram_address::@4
[219] bnkcpy_vram_address::bank#5 = phi( bnkcpy_vram_address::@2/bnkcpy_vram_address::bank#2, bnkcpy_vram_address::@4/bnkcpy_vram_address::bank#1 )
[219] bnkcpy_vram_address::addr#5 = phi( bnkcpy_vram_address::@2/bnkcpy_vram_address::addr#4, bnkcpy_vram_address::@4/(byte*) 40960 )
[220] *VERA_DATA0 = *bnkcpy_vram_address::addr#5
[221] bnkcpy_vram_address::addr#2 = ++ bnkcpy_vram_address::addr#5
[222] bnkcpy_vram_address::pos#1 = ++ bnkcpy_vram_address::pos#2
to:bnkcpy_vram_address::@1
void memcpy_to_vram(byte memcpy_to_vram::vbank , void* memcpy_to_vram::vdest , void* memcpy_to_vram::src , word memcpy_to_vram::num)
memcpy_to_vram: scope:[memcpy_to_vram] from main::@7
[223] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[224] *VERA_ADDRX_L = 0
[225] *VERA_ADDRX_M = >memcpy_to_vram::vdest#0
[226] *VERA_ADDRX_H = VERA_INC_1|memcpy_to_vram::vbank#0
to:memcpy_to_vram::@1
memcpy_to_vram::@1: scope:[memcpy_to_vram] from memcpy_to_vram memcpy_to_vram::@2
[227] memcpy_to_vram::s#2 = phi( memcpy_to_vram/(byte*)memcpy_to_vram::src#0, memcpy_to_vram::@2/memcpy_to_vram::s#1 )
[228] if(memcpy_to_vram::s#2!=memcpy_to_vram::end#0) goto memcpy_to_vram::@2
to:memcpy_to_vram::@return
memcpy_to_vram::@return: scope:[memcpy_to_vram] from memcpy_to_vram::@1
[229] return
to:@return
memcpy_to_vram::@2: scope:[memcpy_to_vram] from memcpy_to_vram::@1
[230] *VERA_DATA0 = *memcpy_to_vram::s#2
[231] memcpy_to_vram::s#1 = ++ memcpy_to_vram::s#2
to:memcpy_to_vram::@1
void vera_layer_mode_tile(byte vera_layer_mode_tile::layer , dword vera_layer_mode_tile::mapbase_address , dword vera_layer_mode_tile::tilebase_address , word vera_layer_mode_tile::mapwidth , word vera_layer_mode_tile::mapheight , byte vera_layer_mode_tile::tilewidth , byte vera_layer_mode_tile::tileheight , byte vera_layer_mode_tile::color_depth)
vera_layer_mode_tile: scope:[vera_layer_mode_tile] from vera_layer_mode_text
[232] phi()
to:vera_layer_mode_tile::@1
vera_layer_mode_tile::@1: scope:[vera_layer_mode_tile] from vera_layer_mode_tile
[233] *(vera_layer_rowshift+vera_layer_mode_text::layer#0) = 8
[234] *(vera_layer_rowskip+vera_layer_mode_text::layer#0*SIZEOF_WORD) = $100
to:vera_layer_mode_tile::@2
vera_layer_mode_tile::@2: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@1
[235] phi()
[236] call vera_layer_set_config
to:vera_layer_mode_tile::@4
vera_layer_mode_tile::@4: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@2
[237] *(vera_mapbase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = 0
[238] *(vera_mapbase_bank+vera_layer_mode_text::layer#0) = 0
[239] *(vera_mapbase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::mapbase_address#0
[240] call vera_layer_set_mapbase
to:vera_layer_mode_tile::@5
vera_layer_mode_tile::@5: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@4
[241] *(vera_tilebase_offset+vera_layer_mode_text::layer#0*SIZEOF_WORD) = <vera_layer_mode_text::tilebase_address#0
[242] *(vera_tilebase_bank+vera_layer_mode_text::layer#0) = 0
[243] *(vera_tilebase_address+vera_layer_mode_text::layer#0*SIZEOF_DWORD) = vera_layer_mode_text::tilebase_address#0
to:vera_layer_mode_tile::@3
vera_layer_mode_tile::@3: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@5
[244] phi()
[245] call vera_layer_set_tilebase
to:vera_layer_mode_tile::@return
vera_layer_mode_tile::@return: scope:[vera_layer_mode_tile] from vera_layer_mode_tile::@3
[246] return
to:@return
byte vera_layer_get_mapbase_bank(byte vera_layer_get_mapbase_bank::layer)
vera_layer_get_mapbase_bank: scope:[vera_layer_get_mapbase_bank] from screenlayer
[247] vera_layer_get_mapbase_bank::return#0 = vera_mapbase_bank[vera_layer_get_mapbase_bank::layer#0]
to:vera_layer_get_mapbase_bank::@return
vera_layer_get_mapbase_bank::@return: scope:[vera_layer_get_mapbase_bank] from vera_layer_get_mapbase_bank
[248] return
to:@return
word vera_layer_get_mapbase_offset(byte vera_layer_get_mapbase_offset::layer)
vera_layer_get_mapbase_offset: scope:[vera_layer_get_mapbase_offset] from screenlayer::@3
[249] vera_layer_get_mapbase_offset::$0 = vera_layer_get_mapbase_offset::layer#0 << 1
[250] vera_layer_get_mapbase_offset::return#0 = vera_mapbase_offset[vera_layer_get_mapbase_offset::$0]
to:vera_layer_get_mapbase_offset::@return
vera_layer_get_mapbase_offset::@return: scope:[vera_layer_get_mapbase_offset] from vera_layer_get_mapbase_offset
[251] return
to:@return
byte vera_layer_get_rowshift(byte vera_layer_get_rowshift::layer)
vera_layer_get_rowshift: scope:[vera_layer_get_rowshift] from screenlayer::@1
[252] vera_layer_get_rowshift::return#0 = vera_layer_rowshift[vera_layer_get_rowshift::layer#0]
to:vera_layer_get_rowshift::@return
vera_layer_get_rowshift::@return: scope:[vera_layer_get_rowshift] from vera_layer_get_rowshift
[253] return
to:@return
word vera_layer_get_rowskip(byte vera_layer_get_rowskip::layer)
vera_layer_get_rowskip: scope:[vera_layer_get_rowskip] from screenlayer::@5
[254] vera_layer_get_rowskip::$0 = vera_layer_get_rowskip::layer#0 << 1
[255] vera_layer_get_rowskip::return#0 = vera_layer_rowskip[vera_layer_get_rowskip::$0]
to:vera_layer_get_rowskip::@return
vera_layer_get_rowskip::@return: scope:[vera_layer_get_rowskip] from vera_layer_get_rowskip
[256] return
to:@return
byte vera_layer_get_backcolor(byte vera_layer_get_backcolor::layer)
vera_layer_get_backcolor: scope:[vera_layer_get_backcolor] from clrscr
[257] vera_layer_get_backcolor::return#0 = vera_layer_backcolor[vera_layer_get_backcolor::layer#0]
to:vera_layer_get_backcolor::@return
vera_layer_get_backcolor::@return: scope:[vera_layer_get_backcolor] from vera_layer_get_backcolor
[258] return
to:@return
byte vera_layer_get_textcolor(byte vera_layer_get_textcolor::layer)
vera_layer_get_textcolor: scope:[vera_layer_get_textcolor] from clrscr::@7
[259] vera_layer_get_textcolor::return#0 = vera_layer_textcolor[vera_layer_get_textcolor::layer#0]
to:vera_layer_get_textcolor::@return
vera_layer_get_textcolor::@return: scope:[vera_layer_get_textcolor] from vera_layer_get_textcolor
[260] return
to:@return
void cputc(byte cputc::c)
cputc: scope:[cputc] from cputs::@2
[261] vera_layer_get_color::layer#0 = conio_screen_layer
[262] call vera_layer_get_color
[263] vera_layer_get_color::return#3 = vera_layer_get_color::return#2
to:cputc::@7
cputc::@7: scope:[cputc] from cputc
[264] cputc::color#0 = vera_layer_get_color::return#3
[265] cputc::$15 = conio_screen_layer << 1
[266] cputc::conio_addr#0 = (byte*)CONIO_SCREEN_TEXT#16 + conio_line_text[cputc::$15]
[267] cputc::$2 = conio_cursor_x[conio_screen_layer] << 1
[268] cputc::conio_addr#1 = cputc::conio_addr#0 + cputc::$2
[269] if(cputc::c#0=='
') goto cputc::@1
to:cputc::@2
cputc::@2: scope:[cputc] from cputc::@7
[270] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[271] cputc::$4 = < cputc::conio_addr#1
[272] *VERA_ADDRX_L = cputc::$4
[273] cputc::$5 = > cputc::conio_addr#1
[274] *VERA_ADDRX_M = cputc::$5
[275] cputc::$6 = CONIO_SCREEN_BANK#14 | VERA_INC_1
[276] *VERA_ADDRX_H = cputc::$6
[277] *VERA_DATA0 = cputc::c#0
[278] *VERA_DATA0 = cputc::color#0
[279] conio_cursor_x[conio_screen_layer] = ++ conio_cursor_x[conio_screen_layer]
[280] cputc::scroll_enable#0 = conio_scroll_enable[conio_screen_layer]
[281] if(0!=cputc::scroll_enable#0) goto cputc::@5
to:cputc::@3
cputc::@3: scope:[cputc] from cputc::@2
[282] cputc::$16 = (word)conio_cursor_x[conio_screen_layer]
[283] if(cputc::$16!=conio_width) goto cputc::@return
to:cputc::@4
cputc::@4: scope:[cputc] from cputc::@3
[284] phi()
[285] call cputln
to:cputc::@return
cputc::@return: scope:[cputc] from cputc::@1 cputc::@3 cputc::@4 cputc::@5 cputc::@6
[286] return
to:@return
cputc::@5: scope:[cputc] from cputc::@2
[287] if(conio_cursor_x[conio_screen_layer]!=conio_screen_width) goto cputc::@return
to:cputc::@6
cputc::@6: scope:[cputc] from cputc::@5
[288] phi()
[289] call cputln
to:cputc::@return
cputc::@1: scope:[cputc] from cputc::@7
[290] phi()
[291] call cputln
to:cputc::@return
void setnam(volatile byte* setnam::filename)
setnam: scope:[setnam] from LoadFileBanked
[292] strlen::str#1 = setnam::filename
[293] call strlen
[294] strlen::return#2 = strlen::len#2
to:setnam::@1
setnam::@1: scope:[setnam] from setnam
[295] setnam::$0 = strlen::return#2
[296] setnam::filename_len = (byte)setnam::$0
asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
to:setnam::@return
setnam::@return: scope:[setnam] from setnam::@1
[298] return
to:@return
void setlfs(volatile byte setlfs::device)
setlfs: scope:[setlfs] from LoadFileBanked::@1
asm { ldxdevice lda#1 ldy#0 jsr$ffba }
to:setlfs::@return
setlfs::@return: scope:[setlfs] from setlfs
[300] return
to:@return
byte load(volatile byte* load::address , volatile byte load::verify)
load: scope:[load] from LoadFileBanked::@2
[301] load::status = 0
asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
to:load::@return
load::@return: scope:[load] from load
[303] return
to:@return
void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config)
vera_layer_set_config: scope:[vera_layer_set_config] from vera_layer_mode_tile::@2
[304] vera_layer_set_config::addr#0 = *(vera_layer_config+vera_layer_mode_text::layer#0*SIZEOF_POINTER)
[305] *vera_layer_set_config::addr#0 = vera_layer_mode_tile::config#10
to:vera_layer_set_config::@return
vera_layer_set_config::@return: scope:[vera_layer_set_config] from vera_layer_set_config
[306] return
to:@return
void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase)
vera_layer_set_tilebase: scope:[vera_layer_set_tilebase] from vera_layer_mode_tile::@3
[307] vera_layer_set_tilebase::addr#0 = *(vera_layer_tilebase+vera_layer_mode_text::layer#0*SIZEOF_POINTER)
[308] *vera_layer_set_tilebase::addr#0 = ><vera_layer_mode_tile::tilebase_address#0&VERA_LAYER_TILEBASE_MASK
to:vera_layer_set_tilebase::@return
vera_layer_set_tilebase::@return: scope:[vera_layer_set_tilebase] from vera_layer_set_tilebase
[309] return
to:@return
byte vera_layer_get_color(byte vera_layer_get_color::layer)
vera_layer_get_color: scope:[vera_layer_get_color] from clearline cputc
[310] vera_layer_get_color::layer#2 = phi( clearline/vera_layer_get_color::layer#1, cputc/vera_layer_get_color::layer#0 )
[311] vera_layer_get_color::$3 = vera_layer_get_color::layer#2 << 1
[312] vera_layer_get_color::addr#0 = vera_layer_config[vera_layer_get_color::$3]
[313] vera_layer_get_color::$0 = *vera_layer_get_color::addr#0 & VERA_LAYER_CONFIG_256C
[314] if(0!=vera_layer_get_color::$0) goto vera_layer_get_color::@1
to:vera_layer_get_color::@2
vera_layer_get_color::@2: scope:[vera_layer_get_color] from vera_layer_get_color
[315] vera_layer_get_color::$1 = vera_layer_backcolor[vera_layer_get_color::layer#2] << 4
[316] vera_layer_get_color::return#1 = vera_layer_get_color::$1 | vera_layer_textcolor[vera_layer_get_color::layer#2]
to:vera_layer_get_color::@return
vera_layer_get_color::@return: scope:[vera_layer_get_color] from vera_layer_get_color::@1 vera_layer_get_color::@2
[317] vera_layer_get_color::return#2 = phi( vera_layer_get_color::@1/vera_layer_get_color::return#0, vera_layer_get_color::@2/vera_layer_get_color::return#1 )
[318] return
to:@return
vera_layer_get_color::@1: scope:[vera_layer_get_color] from vera_layer_get_color
[319] vera_layer_get_color::return#0 = vera_layer_textcolor[vera_layer_get_color::layer#2]
to:vera_layer_get_color::@return
void cputln()
cputln: scope:[cputln] from cputc::@1 cputc::@4 cputc::@6
[320] cputln::$2 = conio_screen_layer << 1
[321] cputln::temp#0 = conio_line_text[cputln::$2]
[322] cputln::temp#1 = cputln::temp#0 + conio_rowskip
[323] cputln::$3 = conio_screen_layer << 1
[324] conio_line_text[cputln::$3] = cputln::temp#1
[325] conio_cursor_x[conio_screen_layer] = 0
[326] conio_cursor_y[conio_screen_layer] = ++ conio_cursor_y[conio_screen_layer]
[327] call cscroll
to:cputln::@return
cputln::@return: scope:[cputln] from cputln
[328] return
to:@return
word strlen(byte* strlen::str)
strlen: scope:[strlen] from setnam
[329] phi()
to:strlen::@1
strlen::@1: scope:[strlen] from strlen strlen::@2
[330] strlen::len#2 = phi( strlen/0, strlen::@2/strlen::len#1 )
[330] strlen::str#2 = phi( strlen/strlen::str#1, strlen::@2/strlen::str#0 )
[331] if(0!=*strlen::str#2) goto strlen::@2
to:strlen::@return
strlen::@return: scope:[strlen] from strlen::@1
[332] return
to:@return
strlen::@2: scope:[strlen] from strlen::@1
[333] strlen::len#1 = ++ strlen::len#2
[334] strlen::str#0 = ++ strlen::str#2
to:strlen::@1
void cscroll()
cscroll: scope:[cscroll] from cputln
[335] if(conio_cursor_y[conio_screen_layer]<conio_screen_height) goto cscroll::@return
to:cscroll::@1
cscroll::@1: scope:[cscroll] from cscroll
[336] if(0!=conio_scroll_enable[conio_screen_layer]) goto cscroll::@4
to:cscroll::@2
cscroll::@2: scope:[cscroll] from cscroll::@1
[337] if(conio_cursor_y[conio_screen_layer]<conio_height) goto cscroll::@return
to:cscroll::@3
cscroll::@3: scope:[cscroll] from cscroll::@2
[338] phi()
to:cscroll::@return
cscroll::@return: scope:[cscroll] from cscroll cscroll::@2 cscroll::@3 cscroll::@5
[339] return
to:@return
cscroll::@4: scope:[cscroll] from cscroll::@1
[340] phi()
[341] call insertup
to:cscroll::@5
cscroll::@5: scope:[cscroll] from cscroll::@4
[342] gotoxy::y#2 = conio_screen_height - 1
[343] call gotoxy
to:cscroll::@return
void insertup()
insertup: scope:[insertup] from cscroll::@4
[344] insertup::cy#0 = conio_cursor_y[conio_screen_layer]
[345] insertup::width#0 = conio_screen_width << 1
to:insertup::@1
insertup::@1: scope:[insertup] from insertup insertup::@4
[346] insertup::i#2 = phi( insertup/1, insertup::@4/insertup::i#1 )
[347] if(insertup::i#2<=insertup::cy#0) goto insertup::@2
to:insertup::@3
insertup::@3: scope:[insertup] from insertup::@1
[348] phi()
[349] call clearline
to:insertup::@return
insertup::@return: scope:[insertup] from insertup::@3
[350] return
to:@return
insertup::@2: scope:[insertup] from insertup::@1
[351] insertup::$3 = insertup::i#2 - 1
[352] insertup::line#0 = insertup::$3 << conio_rowshift
[353] insertup::start#0 = (byte*)CONIO_SCREEN_TEXT#16 + insertup::line#0
[354] memcpy_in_vram::src#0 = insertup::start#0 + conio_rowskip
[355] memcpy_in_vram::dest#0 = (void*)insertup::start#0
[356] memcpy_in_vram::num#0 = insertup::width#0
[357] call memcpy_in_vram
to:insertup::@4
insertup::@4: scope:[insertup] from insertup::@2
[358] insertup::i#1 = ++ insertup::i#2
to:insertup::@1
void clearline()
clearline: scope:[clearline] from insertup::@3
[359] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[360] clearline::$5 = conio_screen_layer << 1
[361] clearline::addr#0 = (byte*)CONIO_SCREEN_TEXT#16 + conio_line_text[clearline::$5]
[362] clearline::$1 = < clearline::addr#0
[363] *VERA_ADDRX_L = clearline::$1
[364] clearline::$2 = > clearline::addr#0
[365] *VERA_ADDRX_M = clearline::$2
[366] *VERA_ADDRX_H = VERA_INC_1
[367] vera_layer_get_color::layer#1 = conio_screen_layer
[368] call vera_layer_get_color
[369] vera_layer_get_color::return#4 = vera_layer_get_color::return#2
to:clearline::@4
clearline::@4: scope:[clearline] from clearline
[370] clearline::color#0 = vera_layer_get_color::return#4
to:clearline::@1
clearline::@1: scope:[clearline] from clearline::@2 clearline::@4
[371] clearline::c#2 = phi( clearline::@2/clearline::c#1, clearline::@4/0 )
[372] if(clearline::c#2<conio_screen_width) goto clearline::@2
to:clearline::@3
clearline::@3: scope:[clearline] from clearline::@1
[373] conio_cursor_x[conio_screen_layer] = 0
to:clearline::@return
clearline::@return: scope:[clearline] from clearline::@3
[374] return
to:@return
clearline::@2: scope:[clearline] from clearline::@1
[375] *VERA_DATA0 = ' '
[376] *VERA_DATA0 = clearline::color#0
[377] clearline::c#1 = ++ clearline::c#2
to:clearline::@1
void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest , byte memcpy_in_vram::dest_increment , byte memcpy_in_vram::src_bank , void* memcpy_in_vram::src , byte memcpy_in_vram::src_increment , word memcpy_in_vram::num)
memcpy_in_vram: scope:[memcpy_in_vram] from insertup::@2
[378] *VERA_CTRL = *VERA_CTRL & ~VERA_ADDRSEL
[379] memcpy_in_vram::$0 = < (void*)memcpy_in_vram::src#0
[380] *VERA_ADDRX_L = memcpy_in_vram::$0
[381] memcpy_in_vram::$1 = > (void*)memcpy_in_vram::src#0
[382] *VERA_ADDRX_M = memcpy_in_vram::$1
[383] *VERA_ADDRX_H = VERA_INC_1
[384] *VERA_CTRL = *VERA_CTRL | VERA_ADDRSEL
[385] memcpy_in_vram::$3 = < memcpy_in_vram::dest#0
[386] *VERA_ADDRX_L = memcpy_in_vram::$3
[387] memcpy_in_vram::$4 = > memcpy_in_vram::dest#0
[388] *VERA_ADDRX_M = memcpy_in_vram::$4
[389] *VERA_ADDRX_H = VERA_INC_1
to:memcpy_in_vram::@1
memcpy_in_vram::@1: scope:[memcpy_in_vram] from memcpy_in_vram memcpy_in_vram::@2
[390] memcpy_in_vram::i#2 = phi( memcpy_in_vram/0, memcpy_in_vram::@2/memcpy_in_vram::i#1 )
[391] if(memcpy_in_vram::i#2<memcpy_in_vram::num#0) goto memcpy_in_vram::@2
to:memcpy_in_vram::@return
memcpy_in_vram::@return: scope:[memcpy_in_vram] from memcpy_in_vram::@1
[392] return
to:@return
memcpy_in_vram::@2: scope:[memcpy_in_vram] from memcpy_in_vram::@1
[393] *VERA_DATA1 = *VERA_DATA0
[394] memcpy_in_vram::i#1 = ++ memcpy_in_vram::i#2
to:memcpy_in_vram::@1

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,605 @@
const struct VERA_SPRITE $0 = { ADDR: <main::VRAM_SPRITE/$20|VERA_SPRITE_8BPP, X: $140-$20, Y: (word)$f0-$20, CTRL1: $c, CTRL2: $f1 }
const nomodify byte BLUE = 6
byte CONIO_SCREEN_BANK
byte CONIO_SCREEN_BANK#14 CONIO_SCREEN_BANK zp[1]:27 100.93636363636364
byte* CONIO_SCREEN_TEXT
word CONIO_SCREEN_TEXT#16 CONIO_SCREEN_TEXT zp[2]:28 0.6392405063291139
byte LoadFileBanked(byte LoadFileBanked::device , byte* LoadFileBanked::filename , dword LoadFileBanked::address)
byte* LoadFileBanked::addr
dword LoadFileBanked::address
byte LoadFileBanked::bank
const byte LoadFileBanked::bank#0 bank = (byte)><main::BANK_SPRITE>>5+(word)<>main::BANK_SPRITE<<3
byte LoadFileBanked::device
const byte LoadFileBanked::device#0 device = 8
byte* LoadFileBanked::filename
byte LoadFileBanked::return
const byte OFFSET_STRUCT_MOS6522_VIA_PORT_A = 1
const byte OFFSET_STRUCT_VERA_SPRITE_X = 2
const byte OFFSET_STRUCT_VERA_SPRITE_Y = 4
const byte RADIX::BINARY = 2
const byte RADIX::DECIMAL = $a
const byte RADIX::HEXADECIMAL = $10
const byte RADIX::OCTAL = 8
const byte SIZEOF_DWORD = 4
const byte SIZEOF_POINTER = 2
const byte SIZEOF_STRUCT_VERA_SPRITE = 8
const byte SIZEOF_WORD = 2
const byte* SPRITE_PIXELS[] = kickasm {{ .var pic = LoadPicture("ship.png")
// palette: rgb->idx
.var palette = Hashtable()
// RGB value for each palette index
.var palList = List()
// Next palette index
.var nxt_idx = 0;
// Extract palette while outputting pixels as palete index values
.for (var y=0; y<64; y++) {
.for (var x=0;x<64; x++) {
// Find palette index (add if not known)
.var rgb = pic.getPixel(x,y);
.var idx = palette.get(rgb)
.if(idx==null) {
.eval idx = nxt_idx++;
.eval palette.put(rgb,idx);
.eval palList.add(rgb)
}
}
}
.if(nxt_idx>16) .error "Image has too many colours "+nxt_idx
.for(var i=0;i<16;i++) {
.var rgb = palList.get(i)
.var red = floor(rgb / [256*256])
.var green = floor(rgb/256) & 255
.var blue = rgb & 255
// bits 4-8: green, bits 0-3 blue
.byte green&$f0 | blue/16
// bits bits 0-3 red
.byte red/16
}
.for (var y=0; y<64; y++) {
.for (var x=0;x<64; x+=2) {
// Find palette index (add if not known)
.var rgb = pic.getPixel(x,y);
.var idx1 = palette.get(rgb)
.if(idx1==null) {
.printnow "unknown rgb value!"
}
// Find palette index (add if not known)
.eval rgb = pic.getPixel(x+1,y);
.var idx2 = palette.get(rgb)
.if(idx2==null) {
.printnow "unknown rgb value!"
}
.byte idx1*16+idx2;
}
}
}}
const nomodify byte VERA_ADDRSEL = 1
const nomodify byte* VERA_ADDRX_H = (byte*) 40738
const nomodify byte* VERA_ADDRX_L = (byte*) 40736
const nomodify byte* VERA_ADDRX_M = (byte*) 40737
const nomodify byte* VERA_CTRL = (byte*) 40741
const nomodify byte* VERA_DATA0 = (byte*) 40739
const nomodify byte* VERA_DATA1 = (byte*) 40740
const nomodify byte VERA_DCSEL = 2
const nomodify byte* VERA_DC_HSCALE = (byte*) 40746
const nomodify byte* VERA_DC_VIDEO = (byte*) 40745
const nomodify byte* VERA_DC_VSCALE = (byte*) 40747
const nomodify byte VERA_INC_1 = $10
const nomodify byte* VERA_L0_CONFIG = (byte*) 40749
const nomodify byte* VERA_L0_MAPBASE = (byte*) 40750
const nomodify byte* VERA_L0_TILEBASE = (byte*) 40751
const nomodify byte* VERA_L1_CONFIG = (byte*) 40756
const nomodify byte* VERA_L1_MAPBASE = (byte*) 40757
const nomodify byte* VERA_L1_TILEBASE = (byte*) 40758
const nomodify byte VERA_LAYER_CONFIG_256C = 8
const to_nomodify word* VERA_LAYER_HEIGHT[4] = { $20, $40, $80, $100 }
const nomodify byte VERA_LAYER_HEIGHT_64 = $40
const nomodify byte VERA_LAYER_HEIGHT_MASK = $c0
const nomodify byte VERA_LAYER_TILEBASE_MASK = $fc
const to_nomodify word* VERA_LAYER_WIDTH[4] = { $20, $40, $80, $100 }
const nomodify byte VERA_LAYER_WIDTH_128 = $20
const nomodify byte VERA_LAYER_WIDTH_MASK = $30
const nomodify dword VERA_PALETTE = $1fa00
const nomodify byte VERA_SPRITES_ENABLE = $40
const nomodify word VERA_SPRITE_8BPP = $8000
const nomodify dword VERA_SPRITE_ATTR = $1fc00
const nomodify struct MOS6522_VIA* VIA1 = (struct MOS6522_VIA*) 40800
const nomodify byte WHITE = 1
void __start()
void bnkcpy_vram_address(dword bnkcpy_vram_address::vdest , dword bnkcpy_vram_address::src , dword bnkcpy_vram_address::num)
word~ bnkcpy_vram_address::$0 zp[2]:43 202.0
byte~ bnkcpy_vram_address::$1 reg byte a 202.0
word~ bnkcpy_vram_address::$10 zp[2]:59 202.0
byte~ bnkcpy_vram_address::$11 reg byte x 101.0
word~ bnkcpy_vram_address::$12 zp[2]:61 202.0
word~ bnkcpy_vram_address::$13 zp[2]:61 40.4
word~ bnkcpy_vram_address::$14 zp[2]:63 202.0
word~ bnkcpy_vram_address::$15 zp[2]:63 202.0
byte~ bnkcpy_vram_address::$16 reg byte a 101.0
word~ bnkcpy_vram_address::$17 zp[2]:61 101.0
word~ bnkcpy_vram_address::$18 zp[2]:15 202.0
word~ bnkcpy_vram_address::$2 zp[2]:45 202.0
word~ bnkcpy_vram_address::$23 zp[2]:61 202.0
word~ bnkcpy_vram_address::$24 zp[2]:65 202.0
byte~ bnkcpy_vram_address::$3 reg byte a 202.0
word~ bnkcpy_vram_address::$4 zp[2]:53 202.0
byte~ bnkcpy_vram_address::$5 reg byte a 202.0
word~ bnkcpy_vram_address::$7 zp[2]:55 202.0
word~ bnkcpy_vram_address::$8 zp[2]:55 202.0
byte~ bnkcpy_vram_address::$9 reg byte y 33.666666666666664
byte* bnkcpy_vram_address::addr
word bnkcpy_vram_address::addr#0 addr zp[2]:15 101.0
byte* bnkcpy_vram_address::addr#1 addr zp[2]:15 101.0
byte* bnkcpy_vram_address::addr#2 addr zp[2]:15 1001.0
byte* bnkcpy_vram_address::addr#4 addr zp[2]:15 1034.6666666666667
byte* bnkcpy_vram_address::addr#5 addr zp[2]:15 1501.5
byte bnkcpy_vram_address::bank
byte bnkcpy_vram_address::bank#0 reg byte x 60.599999999999994
byte bnkcpy_vram_address::bank#1 reg byte x 1501.5
byte bnkcpy_vram_address::bank#2 reg byte x 1034.6666666666667
byte bnkcpy_vram_address::bank#5 reg byte x 750.75
dword bnkcpy_vram_address::beg
dword bnkcpy_vram_address::beg#0 beg zp[4]:11 19.548387096774196
dword bnkcpy_vram_address::end
dword bnkcpy_vram_address::end#0 end zp[4]:7 39.357142857142854
dword bnkcpy_vram_address::num
dword bnkcpy_vram_address::num#2 num zp[4]:7 8.416666666666666
dword bnkcpy_vram_address::pos
dword bnkcpy_vram_address::pos#1 pos zp[4]:11 2002.0
dword bnkcpy_vram_address::pos#2 pos zp[4]:11 388.0
dword bnkcpy_vram_address::src
dword bnkcpy_vram_address::vdest
dword bnkcpy_vram_address::vdest#2 vdest zp[4]:3 37.875
void clearline()
byte~ clearline::$1 reg byte a 2.00000002E8
byte~ clearline::$2 reg byte a 2.00000002E8
byte~ clearline::$5 reg byte a 2.00000002E8
byte* clearline::addr
byte* clearline::addr#0 addr zp[2]:65 1.00000001E8
word clearline::c
word clearline::c#1 c zp[2]:43 2.0000000002E10
word clearline::c#2 c zp[2]:43 7.50000000075E9
byte clearline::color
byte clearline::color#0 reg byte x 1.6833333336666665E9
void clrscr()
byte~ clrscr::$0 reg byte a 202.0
byte~ clrscr::$1 zp[1]:36 40.4
byte~ clrscr::$2 reg byte a 202.0
byte~ clrscr::$5 reg byte a 2002.0
byte~ clrscr::$6 reg byte a 2002.0
byte~ clrscr::$7 reg byte a 2002.0
byte~ clrscr::$9 reg byte a 202.0
byte clrscr::c
byte clrscr::c#1 reg byte y 20002.0
byte clrscr::c#2 reg byte y 7500.75
byte* clrscr::ch
byte clrscr::color
byte clrscr::color#0 color zp[1]:36 594.2352941176471
byte clrscr::l
byte clrscr::l#1 reg byte x 2002.0
byte clrscr::l#2 reg byte x 200.2
byte* clrscr::line_text
byte* clrscr::line_text#0 line_text zp[2]:15 18.363636363636363
byte* clrscr::line_text#1 line_text zp[2]:15 1001.0
byte* clrscr::line_text#2 line_text zp[2]:15 293.2142857142857
const byte* conio_cursor_x[2] = { 0, 0 }
const byte* conio_cursor_y[2] = { 0, 0 }
word conio_height loadstore zp[2]:22 10650.053191489362
const word* conio_line_text[2] = { 0, 0 }
byte conio_rowshift loadstore zp[1]:24 8559322.923728812
word conio_rowskip loadstore zp[2]:25 8404210.974789916
volatile byte conio_screen_height loadstore zp[1]:18 115384.875
byte conio_screen_layer loadstore zp[1]:19 1789433.5208333333
volatile byte conio_screen_width loadstore zp[1]:17 7.208640292086332E7
const byte* conio_scroll_enable[2] = { 1, 1 }
word conio_width loadstore zp[2]:20 209.42708333333331
void conio_x16_init()
const nomodify byte* conio_x16_init::BASIC_CURSOR_LINE = (byte*) 214
byte conio_x16_init::line
byte conio_x16_init::line#0 line zp[1]:2 2.1999999999999997
byte conio_x16_init::line#1 line zp[1]:2 22.0
byte conio_x16_init::line#3 line zp[1]:2 33.0
void cputc(byte cputc::c)
byte~ cputc::$15 reg byte a 20002.0
word~ cputc::$16 zp[2]:45 20002.0
byte~ cputc::$2 reg byte a 20002.0
byte~ cputc::$4 reg byte a 20002.0
byte~ cputc::$5 reg byte a 20002.0
byte~ cputc::$6 reg byte a 20002.0
byte cputc::c
byte cputc::c#0 c zp[1]:36 1235.4705882352941
byte cputc::color
byte cputc::color#0 reg byte x 1428.7142857142858
byte* cputc::conio_addr
byte* cputc::conio_addr#0 conio_addr zp[2]:43 10001.0
byte* cputc::conio_addr#1 conio_addr zp[2]:43 6000.6
byte cputc::scroll_enable
byte cputc::scroll_enable#0 reg byte a 20002.0
void cputln()
byte~ cputln::$2 reg byte a 200002.0
byte~ cputln::$3 reg byte a 200002.0
word cputln::temp
word cputln::temp#0 temp zp[2]:55 200002.0
word cputln::temp#1 temp zp[2]:55 100001.0
void cputs(to_nomodify byte* cputs::s)
byte cputs::c
byte cputs::c#1 reg byte a 1001.0
to_nomodify byte* cputs::s
to_nomodify byte* cputs::s#0 s zp[2]:15 500.5
to_nomodify byte* cputs::s#2 s zp[2]:15 1501.5
void cscroll()
void gotoxy(byte gotoxy::x , byte gotoxy::y)
byte~ gotoxy::$5 reg byte a 2.0000002E7
word~ gotoxy::$6 zp[2]:32 2.0000002E7
word gotoxy::line_offset
word gotoxy::line_offset#0 line_offset zp[2]:32 1.0000001E7
byte gotoxy::x
byte gotoxy::y
byte gotoxy::y#0 reg byte x 22.0
byte gotoxy::y#2 reg byte x 2000002.0
byte gotoxy::y#3 reg byte x 7000004.666666666
byte gotoxy::y#4 reg byte x 4000000.4
void insertup()
byte~ insertup::$3 reg byte a 2.000000002E9
byte insertup::cy
byte insertup::cy#0 cy zp[1]:57 8.416666683333334E7
byte insertup::i
byte insertup::i#1 reg byte x 2.000000002E9
byte insertup::i#2 reg byte x 4.444444448888889E8
word insertup::line
word insertup::line#0 line zp[2]:59 2.000000002E9
byte* insertup::start
byte* insertup::start#0 start zp[2]:59 1.000000001E9
byte insertup::width
byte insertup::width#0 width zp[1]:58 9.1818182E7
byte load(volatile byte* load::address , volatile byte load::verify)
volatile byte* load::address loadstore zp[2]:40 33.666666666666664
byte load::return
volatile byte load::status loadstore zp[1]:48 1001.0
volatile byte load::verify loadstore zp[1]:42 50.5
void main()
const nomodify dword main::BANK_SPRITE = $12000
struct VERA_SPRITE main::SPRITE_ATTR loadstore zp[8]:67
const nomodify dword main::VRAM_SPRITE = $10000
const byte* main::filename[7] = "SPRITE"
const byte* main::s[$2d] = "
sprite banked file load and display demo.
"
void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest , byte memcpy_in_vram::dest_increment , byte memcpy_in_vram::src_bank , void* memcpy_in_vram::src , byte memcpy_in_vram::src_increment , word memcpy_in_vram::num)
byte~ memcpy_in_vram::$0 reg byte a 2.0000000002E10
byte~ memcpy_in_vram::$1 reg byte a 2.0000000002E10
byte~ memcpy_in_vram::$3 reg byte a 2.0000000002E10
byte~ memcpy_in_vram::$4 reg byte a 2.0000000002E10
void* memcpy_in_vram::dest
void* memcpy_in_vram::dest#0 dest zp[2]:59 1.9090909093636363E9
byte memcpy_in_vram::dest_bank
byte memcpy_in_vram::dest_increment
word memcpy_in_vram::i
word memcpy_in_vram::i#1 i zp[2]:45 2.0000000000002E13
word memcpy_in_vram::i#2 i zp[2]:45 1.0000000000001E13
word memcpy_in_vram::num
word memcpy_in_vram::num#0 num zp[2]:63 5.882941176471765E11
void* memcpy_in_vram::src
byte* memcpy_in_vram::src#0 src zp[2]:61 1.6666666683333334E8
byte memcpy_in_vram::src_bank
byte memcpy_in_vram::src_increment
void memcpy_to_vram(byte memcpy_to_vram::vbank , void* memcpy_to_vram::vdest , void* memcpy_to_vram::src , word memcpy_to_vram::num)
byte* memcpy_to_vram::end
const byte* memcpy_to_vram::end#0 end = (byte*)memcpy_to_vram::src#0+SIZEOF_STRUCT_VERA_SPRITE
word memcpy_to_vram::num
byte* memcpy_to_vram::s
byte* memcpy_to_vram::s#1 s zp[2]:15 2002.0
byte* memcpy_to_vram::s#2 s zp[2]:15 1334.6666666666667
void* memcpy_to_vram::src
const void* memcpy_to_vram::src#0 src = (void*)&main::SPRITE_ATTR
byte memcpy_to_vram::vbank
const byte memcpy_to_vram::vbank#0 vbank = (byte)>VERA_SPRITE_ATTR
void* memcpy_to_vram::vdest
const void* memcpy_to_vram::vdest#0 vdest = (void*)<VERA_SPRITE_ATTR
void screenlayer(byte screenlayer::layer)
word~ screenlayer::$2 zp[2]:30 202.0
byte~ screenlayer::$3 reg byte a 202.0
word~ screenlayer::$4 zp[2]:32 202.0
word~ screenlayer::$5 zp[2]:49 202.0
byte screenlayer::layer
byte~ screenlayer::vera_layer_get_height1_$0 reg byte a 202.0
byte~ screenlayer::vera_layer_get_height1_$1 reg byte a 202.0
byte~ screenlayer::vera_layer_get_height1_$2 reg byte a 202.0
byte~ screenlayer::vera_layer_get_height1_$3 reg byte a 202.0
byte* screenlayer::vera_layer_get_height1_config
byte* screenlayer::vera_layer_get_height1_config#0 vera_layer_get_height1_config zp[2]:34 202.0
byte screenlayer::vera_layer_get_height1_layer
byte screenlayer::vera_layer_get_height1_layer#0 reg byte a 202.0
word screenlayer::vera_layer_get_height1_return
word screenlayer::vera_layer_get_height1_return#0 vera_layer_get_height1_return zp[2]:49 202.0
word screenlayer::vera_layer_get_height1_return#1 vera_layer_get_height1_return zp[2]:49 202.0
byte~ screenlayer::vera_layer_get_width1_$0 reg byte a 202.0
byte~ screenlayer::vera_layer_get_width1_$1 reg byte a 202.0
byte~ screenlayer::vera_layer_get_width1_$2 reg byte a 202.0
byte~ screenlayer::vera_layer_get_width1_$3 reg byte a 202.0
byte* screenlayer::vera_layer_get_width1_config
byte* screenlayer::vera_layer_get_width1_config#0 vera_layer_get_width1_config zp[2]:51 202.0
byte screenlayer::vera_layer_get_width1_layer
byte screenlayer::vera_layer_get_width1_layer#0 reg byte a 202.0
word screenlayer::vera_layer_get_width1_return
word screenlayer::vera_layer_get_width1_return#0 vera_layer_get_width1_return zp[2]:30 202.0
word screenlayer::vera_layer_get_width1_return#1 vera_layer_get_width1_return zp[2]:30 202.0
void screensize(byte* screensize::x , byte* screensize::y)
byte~ screensize::$1 reg byte a 202.0
byte~ screensize::$3 reg byte a 202.0
byte screensize::hscale
byte screensize::hscale#0 reg byte a 202.0
byte screensize::vscale
byte screensize::vscale#0 reg byte a 202.0
byte* screensize::x
const byte* screensize::x#0 x = &conio_screen_width
byte* screensize::y
const byte* screensize::y#0 y = &conio_screen_height
void setlfs(volatile byte setlfs::device)
volatile byte setlfs::device loadstore zp[1]:39 101.0
void setnam(volatile byte* setnam::filename)
word~ setnam::$0 zp[2]:45 1001.0
volatile byte* setnam::filename loadstore zp[2]:37 183.66666666666669
volatile byte setnam::filename_len loadstore zp[1]:47 1001.0
word strlen(byte* strlen::str)
word strlen::len
word strlen::len#1 len zp[2]:45 100001.0
word strlen::len#2 len zp[2]:45 50250.75
word strlen::return
word strlen::return#2 return zp[2]:45 2002.0
byte* strlen::str
byte* strlen::str#0 str zp[2]:43 200002.0
byte* strlen::str#1 str zp[2]:43 5501.0
byte* strlen::str#2 str zp[2]:43 103334.66666666666
const byte* vera_layer_backcolor[2] = { BLUE, BLUE }
const byte** vera_layer_config[2] = { VERA_L0_CONFIG, VERA_L1_CONFIG }
byte vera_layer_get_backcolor(byte vera_layer_get_backcolor::layer)
byte vera_layer_get_backcolor::layer
byte vera_layer_get_backcolor::layer#0 reg byte x 1102.0
byte vera_layer_get_backcolor::return
byte vera_layer_get_backcolor::return#0 reg byte a 367.33333333333337
byte vera_layer_get_backcolor::return#2 reg byte a 202.0
byte vera_layer_get_color(byte vera_layer_get_color::layer)
byte~ vera_layer_get_color::$0 reg byte a 2.000000002E9
byte~ vera_layer_get_color::$1 reg byte a 2.000000002E9
byte~ vera_layer_get_color::$3 reg byte a 2.000000002E9
byte* vera_layer_get_color::addr
byte* vera_layer_get_color::addr#0 addr zp[2]:53 2.000000002E9
byte vera_layer_get_color::layer
byte vera_layer_get_color::layer#0 reg byte x 20002.0
byte vera_layer_get_color::layer#1 reg byte x 2.00000002E8
byte vera_layer_get_color::layer#2 reg byte x 6.833350010000001E8
byte vera_layer_get_color::return
byte vera_layer_get_color::return#0 reg byte a 2.000000002E9
byte vera_layer_get_color::return#1 reg byte a 2.000000002E9
byte vera_layer_get_color::return#2 reg byte a 5.25002501E8
byte vera_layer_get_color::return#3 reg byte a 20002.0
byte vera_layer_get_color::return#4 reg byte a 2.00000002E8
byte vera_layer_get_mapbase_bank(byte vera_layer_get_mapbase_bank::layer)
byte vera_layer_get_mapbase_bank::layer
byte vera_layer_get_mapbase_bank::layer#0 reg byte x 1102.0
byte vera_layer_get_mapbase_bank::return
byte vera_layer_get_mapbase_bank::return#0 reg byte a 367.33333333333337
byte vera_layer_get_mapbase_bank::return#2 reg byte a 202.0
word vera_layer_get_mapbase_offset(byte vera_layer_get_mapbase_offset::layer)
byte~ vera_layer_get_mapbase_offset::$0 reg byte a 2002.0
byte vera_layer_get_mapbase_offset::layer
byte vera_layer_get_mapbase_offset::layer#0 reg byte a 1102.0
word vera_layer_get_mapbase_offset::return
word vera_layer_get_mapbase_offset::return#0 return zp[2]:51 367.33333333333337
word vera_layer_get_mapbase_offset::return#2 return zp[2]:51 202.0
byte vera_layer_get_rowshift(byte vera_layer_get_rowshift::layer)
byte vera_layer_get_rowshift::layer
byte vera_layer_get_rowshift::layer#0 reg byte x 1102.0
byte vera_layer_get_rowshift::return
byte vera_layer_get_rowshift::return#0 reg byte a 367.33333333333337
byte vera_layer_get_rowshift::return#2 reg byte a 202.0
word vera_layer_get_rowskip(byte vera_layer_get_rowskip::layer)
byte~ vera_layer_get_rowskip::$0 reg byte a 2002.0
byte vera_layer_get_rowskip::layer
byte vera_layer_get_rowskip::layer#0 reg byte a 1102.0
word vera_layer_get_rowskip::return
word vera_layer_get_rowskip::return#0 return zp[2]:32 367.33333333333337
word vera_layer_get_rowskip::return#2 return zp[2]:32 202.0
byte vera_layer_get_textcolor(byte vera_layer_get_textcolor::layer)
byte vera_layer_get_textcolor::layer
byte vera_layer_get_textcolor::layer#0 reg byte x 1102.0
byte vera_layer_get_textcolor::return
byte vera_layer_get_textcolor::return#0 reg byte a 367.33333333333337
byte vera_layer_get_textcolor::return#2 reg byte a 202.0
const byte** vera_layer_mapbase[2] = { VERA_L0_MAPBASE, VERA_L1_MAPBASE }
void vera_layer_mode_text(byte vera_layer_mode_text::layer , dword vera_layer_mode_text::mapbase_address , dword vera_layer_mode_text::tilebase_address , word vera_layer_mode_text::mapwidth , word vera_layer_mode_text::mapheight , byte vera_layer_mode_text::tilewidth , byte vera_layer_mode_text::tileheight , word vera_layer_mode_text::color_mode)
word vera_layer_mode_text::color_mode
byte vera_layer_mode_text::layer
const byte vera_layer_mode_text::layer#0 layer = 1
dword vera_layer_mode_text::mapbase_address
const dword vera_layer_mode_text::mapbase_address#0 mapbase_address = 0
word vera_layer_mode_text::mapheight
word vera_layer_mode_text::mapwidth
dword vera_layer_mode_text::tilebase_address
const dword vera_layer_mode_text::tilebase_address#0 tilebase_address = $f800
byte vera_layer_mode_text::tileheight
byte vera_layer_mode_text::tilewidth
void vera_layer_mode_tile(byte vera_layer_mode_tile::layer , dword vera_layer_mode_tile::mapbase_address , dword vera_layer_mode_tile::tilebase_address , word vera_layer_mode_tile::mapwidth , word vera_layer_mode_tile::mapheight , byte vera_layer_mode_tile::tilewidth , byte vera_layer_mode_tile::tileheight , byte vera_layer_mode_tile::color_depth)
byte vera_layer_mode_tile::color_depth
byte vera_layer_mode_tile::config
const byte vera_layer_mode_tile::config#10 config = VERA_LAYER_WIDTH_128|VERA_LAYER_HEIGHT_64
byte vera_layer_mode_tile::layer
byte vera_layer_mode_tile::mapbase
const byte vera_layer_mode_tile::mapbase#0 mapbase = 0
dword vera_layer_mode_tile::mapbase_address
word vera_layer_mode_tile::mapheight
word vera_layer_mode_tile::mapwidth
byte vera_layer_mode_tile::tilebase
dword vera_layer_mode_tile::tilebase_address
const dword vera_layer_mode_tile::tilebase_address#0 tilebase_address = vera_layer_mode_text::tilebase_address#0>>1
byte vera_layer_mode_tile::tileheight
byte vera_layer_mode_tile::tilewidth
const byte* vera_layer_rowshift[2] = { 0, 0 }
const word* vera_layer_rowskip[2] = { 0, 0 }
byte vera_layer_set_backcolor(byte vera_layer_set_backcolor::layer , byte vera_layer_set_backcolor::color)
byte vera_layer_set_backcolor::color
byte vera_layer_set_backcolor::layer
const byte vera_layer_set_backcolor::layer#0 layer = 1
byte vera_layer_set_backcolor::old
byte vera_layer_set_backcolor::return
void vera_layer_set_config(byte vera_layer_set_config::layer , byte vera_layer_set_config::config)
byte* vera_layer_set_config::addr
byte* vera_layer_set_config::addr#0 addr zp[2]:49 20002.0
byte vera_layer_set_config::config
byte vera_layer_set_config::layer
void vera_layer_set_mapbase(byte vera_layer_set_mapbase::layer , byte vera_layer_set_mapbase::mapbase)
byte~ vera_layer_set_mapbase::$0 reg byte a 20002.0
byte* vera_layer_set_mapbase::addr
byte* vera_layer_set_mapbase::addr#0 addr zp[2]:30 20002.0
byte vera_layer_set_mapbase::layer
byte vera_layer_set_mapbase::layer#3 reg byte a 10001.0
byte vera_layer_set_mapbase::mapbase
byte vera_layer_set_mapbase::mapbase#3 reg byte x 3333.6666666666665
void vera_layer_set_text_color_mode(byte vera_layer_set_text_color_mode::layer , byte vera_layer_set_text_color_mode::color_mode)
byte~ vera_layer_set_text_color_mode::$0 reg byte a 2002.0
byte* vera_layer_set_text_color_mode::addr
byte* vera_layer_set_text_color_mode::addr#0 addr zp[2]:34 2502.5
byte vera_layer_set_text_color_mode::color_mode
byte vera_layer_set_text_color_mode::layer
byte vera_layer_set_text_color_mode::layer#3 reg byte a 1001.0
byte vera_layer_set_textcolor(byte vera_layer_set_textcolor::layer , byte vera_layer_set_textcolor::color)
byte vera_layer_set_textcolor::color
byte vera_layer_set_textcolor::layer
const byte vera_layer_set_textcolor::layer#0 layer = 1
byte vera_layer_set_textcolor::old
byte vera_layer_set_textcolor::return
void vera_layer_set_tilebase(byte vera_layer_set_tilebase::layer , byte vera_layer_set_tilebase::tilebase)
byte* vera_layer_set_tilebase::addr
byte* vera_layer_set_tilebase::addr#0 addr zp[2]:51 20002.0
byte vera_layer_set_tilebase::layer
byte vera_layer_set_tilebase::tilebase
const byte* vera_layer_textcolor[2] = { WHITE, WHITE }
const byte** vera_layer_tilebase[2] = { VERA_L0_TILEBASE, VERA_L1_TILEBASE }
const dword* vera_mapbase_address[2] = { 0, 0 }
const byte* vera_mapbase_bank[2] = { 0, 0 }
const word* vera_mapbase_offset[2] = { 0, 0 }
const dword* vera_tilebase_address[2] = { 0, 0 }
const byte* vera_tilebase_bank[2] = { 0, 0 }
const word* vera_tilebase_offset[2] = { 0, 0 }
zp[1]:2 [ conio_x16_init::line#3 conio_x16_init::line#1 conio_x16_init::line#0 ]
reg byte a [ vera_layer_set_mapbase::layer#3 ]
reg byte x [ vera_layer_set_mapbase::mapbase#3 ]
reg byte x [ gotoxy::y#4 gotoxy::y#3 gotoxy::y#0 gotoxy::y#2 ]
reg byte a [ vera_layer_set_text_color_mode::layer#3 ]
reg byte x [ clrscr::l#2 clrscr::l#1 ]
reg byte y [ clrscr::c#2 clrscr::c#1 ]
zp[4]:3 [ bnkcpy_vram_address::vdest#2 ]
zp[4]:7 [ bnkcpy_vram_address::num#2 bnkcpy_vram_address::end#0 ]
zp[4]:11 [ bnkcpy_vram_address::pos#2 bnkcpy_vram_address::beg#0 bnkcpy_vram_address::pos#1 ]
reg byte x [ bnkcpy_vram_address::bank#2 bnkcpy_vram_address::bank#0 bnkcpy_vram_address::bank#5 bnkcpy_vram_address::bank#1 ]
zp[2]:15 [ memcpy_to_vram::s#2 memcpy_to_vram::s#1 bnkcpy_vram_address::addr#5 bnkcpy_vram_address::addr#4 bnkcpy_vram_address::addr#1 bnkcpy_vram_address::addr#2 bnkcpy_vram_address::addr#0 bnkcpy_vram_address::$18 cputs::s#2 cputs::s#0 clrscr::line_text#2 clrscr::line_text#1 clrscr::line_text#0 ]
reg byte x [ vera_layer_get_color::layer#2 vera_layer_get_color::layer#1 vera_layer_get_color::layer#0 ]
reg byte a [ vera_layer_get_color::return#2 vera_layer_get_color::return#0 vera_layer_get_color::return#1 ]
reg byte x [ insertup::i#2 insertup::i#1 ]
zp[1]:17 [ conio_screen_width ]
zp[1]:18 [ conio_screen_height ]
zp[1]:19 [ conio_screen_layer ]
zp[2]:20 [ conio_width ]
zp[2]:22 [ conio_height ]
zp[1]:24 [ conio_rowshift ]
zp[2]:25 [ conio_rowskip ]
reg byte a [ screensize::hscale#0 ]
reg byte a [ screensize::$1 ]
reg byte a [ screensize::vscale#0 ]
reg byte a [ screensize::$3 ]
reg byte x [ vera_layer_get_mapbase_bank::layer#0 ]
reg byte a [ vera_layer_get_mapbase_bank::return#2 ]
zp[1]:27 [ CONIO_SCREEN_BANK#14 ]
reg byte a [ vera_layer_get_mapbase_offset::layer#0 ]
zp[2]:28 [ CONIO_SCREEN_TEXT#16 ]
reg byte a [ screenlayer::vera_layer_get_width1_layer#0 ]
reg byte a [ screenlayer::vera_layer_get_width1_$2 ]
reg byte a [ screenlayer::vera_layer_get_width1_$0 ]
reg byte a [ screenlayer::vera_layer_get_width1_$1 ]
reg byte a [ screenlayer::vera_layer_get_width1_$3 ]
reg byte x [ vera_layer_get_rowshift::layer#0 ]
reg byte a [ vera_layer_get_rowshift::return#2 ]
reg byte a [ screenlayer::$3 ]
reg byte a [ vera_layer_get_rowskip::layer#0 ]
reg byte a [ screenlayer::vera_layer_get_height1_layer#0 ]
reg byte a [ screenlayer::vera_layer_get_height1_$2 ]
reg byte a [ screenlayer::vera_layer_get_height1_$0 ]
reg byte a [ screenlayer::vera_layer_get_height1_$1 ]
reg byte a [ screenlayer::vera_layer_get_height1_$3 ]
reg byte a [ vera_layer_set_mapbase::$0 ]
zp[2]:30 [ vera_layer_set_mapbase::addr#0 screenlayer::vera_layer_get_width1_return#0 screenlayer::vera_layer_get_width1_return#1 screenlayer::$2 ]
zp[2]:32 [ gotoxy::$6 gotoxy::line_offset#0 vera_layer_get_rowskip::return#2 screenlayer::$4 vera_layer_get_rowskip::return#0 ]
reg byte a [ gotoxy::$5 ]
reg byte a [ vera_layer_set_text_color_mode::$0 ]
zp[2]:34 [ vera_layer_set_text_color_mode::addr#0 screenlayer::vera_layer_get_height1_config#0 ]
reg byte x [ vera_layer_get_backcolor::layer#0 ]
reg byte a [ vera_layer_get_backcolor::return#2 ]
reg byte a [ clrscr::$0 ]
reg byte x [ vera_layer_get_textcolor::layer#0 ]
reg byte a [ vera_layer_get_textcolor::return#2 ]
reg byte a [ clrscr::$2 ]
reg byte a [ clrscr::$9 ]
reg byte a [ clrscr::$5 ]
reg byte a [ clrscr::$6 ]
reg byte a [ clrscr::$7 ]
reg byte a [ cputs::c#1 ]
zp[1]:36 [ cputc::c#0 clrscr::$1 clrscr::color#0 ]
zp[2]:37 [ setnam::filename ]
zp[1]:39 [ setlfs::device ]
zp[2]:40 [ load::address ]
zp[1]:42 [ load::verify ]
reg byte a [ bnkcpy_vram_address::$1 ]
reg byte a [ bnkcpy_vram_address::$3 ]
reg byte a [ bnkcpy_vram_address::$5 ]
reg byte y [ bnkcpy_vram_address::$9 ]
reg byte x [ bnkcpy_vram_address::$11 ]
reg byte a [ bnkcpy_vram_address::$16 ]
reg byte a [ vera_layer_get_mapbase_bank::return#0 ]
reg byte a [ vera_layer_get_mapbase_offset::$0 ]
reg byte a [ vera_layer_get_rowshift::return#0 ]
reg byte a [ vera_layer_get_rowskip::$0 ]
reg byte a [ vera_layer_get_backcolor::return#0 ]
reg byte a [ vera_layer_get_textcolor::return#0 ]
reg byte a [ vera_layer_get_color::return#3 ]
reg byte x [ cputc::color#0 ]
reg byte a [ cputc::$15 ]
zp[2]:43 [ cputc::conio_addr#0 cputc::conio_addr#1 bnkcpy_vram_address::$0 clearline::c#2 clearline::c#1 strlen::str#2 strlen::str#1 strlen::str#0 ]
reg byte a [ cputc::$2 ]
reg byte a [ cputc::$4 ]
reg byte a [ cputc::$5 ]
reg byte a [ cputc::$6 ]
reg byte a [ cputc::scroll_enable#0 ]
zp[2]:45 [ cputc::$16 bnkcpy_vram_address::$2 memcpy_in_vram::i#2 memcpy_in_vram::i#1 strlen::len#2 strlen::len#1 strlen::return#2 setnam::$0 ]
zp[1]:47 [ setnam::filename_len ]
zp[1]:48 [ load::status ]
zp[2]:49 [ vera_layer_set_config::addr#0 screenlayer::vera_layer_get_height1_return#0 screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 ]
zp[2]:51 [ vera_layer_set_tilebase::addr#0 screenlayer::vera_layer_get_width1_config#0 vera_layer_get_mapbase_offset::return#2 vera_layer_get_mapbase_offset::return#0 ]
reg byte a [ vera_layer_get_color::$3 ]
zp[2]:53 [ vera_layer_get_color::addr#0 bnkcpy_vram_address::$4 ]
reg byte a [ vera_layer_get_color::$0 ]
reg byte a [ vera_layer_get_color::$1 ]
reg byte a [ cputln::$2 ]
zp[2]:55 [ cputln::temp#0 cputln::temp#1 bnkcpy_vram_address::$7 bnkcpy_vram_address::$8 ]
reg byte a [ cputln::$3 ]
zp[1]:57 [ insertup::cy#0 ]
zp[1]:58 [ insertup::width#0 ]
reg byte a [ insertup::$3 ]
zp[2]:59 [ insertup::line#0 insertup::start#0 memcpy_in_vram::dest#0 bnkcpy_vram_address::$10 ]
zp[2]:61 [ memcpy_in_vram::src#0 bnkcpy_vram_address::$23 bnkcpy_vram_address::$12 bnkcpy_vram_address::$13 bnkcpy_vram_address::$17 ]
zp[2]:63 [ memcpy_in_vram::num#0 bnkcpy_vram_address::$14 bnkcpy_vram_address::$15 ]
reg byte a [ clearline::$5 ]
zp[2]:65 [ clearline::addr#0 bnkcpy_vram_address::$24 ]
reg byte a [ clearline::$1 ]
reg byte a [ clearline::$2 ]
reg byte a [ vera_layer_get_color::return#4 ]
reg byte x [ clearline::color#0 ]
reg byte a [ memcpy_in_vram::$0 ]
reg byte a [ memcpy_in_vram::$1 ]
reg byte a [ memcpy_in_vram::$3 ]
reg byte a [ memcpy_in_vram::$4 ]
zp[8]:67 [ main::SPRITE_ATTR ]

View File

@ -1,4 +1,11 @@
Resolved forward reference irq_line to __interrupt(rom_min_cx16) void irq_line()
Setting inferred volatile on symbol affected by address-of: setnam::filename_len in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setnam::filename in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setlfs::device in asm { ldxdevice lda#1 ldy#0 jsr$ffba }
Setting inferred volatile on symbol affected by address-of: load::address in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: load::verify in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: load::status in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: getin::ch in asm { jsr$ffe4 stach }
Inlined call call SEI
Inlined call call CLI
Inlined call call __init

View File

@ -462,7 +462,7 @@ memcpy_to_vram: {
}
.segment Data
// A 64*64 8bpp TUT sprite and palette
.align $1000
.align $400
SPRITE_PIXELS:
.var pic = LoadPicture("tut.png")
// palette: rgb->idx

View File

@ -1,6 +1,13 @@
Resolved forward reference irq_vsync to __interrupt(rom_sys_cx16) void irq_vsync()
Setting struct to load/store in variable affected by address-of main::$6 = call memcpy_to_vram (byte)>VERA_SPRITE_ATTR main::vram_sprite_attr &SPRITE_ATTR main::$5
Setting struct to load/store in variable affected by address-of irq_vsync::$5 = call memcpy_to_vram irq_vsync::vram_sprite_attr_bank irq_vsync::vram_sprite_pos &SPRITE_ATTR+2 4
Setting inferred volatile on symbol affected by address-of: setnam::filename_len in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setnam::filename in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setlfs::device in asm { ldxdevice lda#1 ldy#0 jsr$ffba }
Setting inferred volatile on symbol affected by address-of: load::address in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: load::verify in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: load::status in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: getin::ch in asm { jsr$ffe4 stach }
Resolving sizeof() main::$5 = sizeof SPRITE_ATTR
Resolving sizeof() main::$7 = sizeof SPRITE_ATTR
Resolving sizeof() irq_vsync::$6 = sizeof SPRITE_ATTR
@ -1669,7 +1676,7 @@ memcpy_to_vram: {
// File Data
.segment Data
// A 64*64 8bpp TUT sprite and palette
.align $1000
.align $400
SPRITE_PIXELS:
.var pic = LoadPicture("tut.png")
// palette: rgb->idx
@ -2537,7 +2544,7 @@ memcpy_to_vram: {
// File Data
.segment Data
// A 64*64 8bpp TUT sprite and palette
.align $1000
.align $400
SPRITE_PIXELS:
.var pic = LoadPicture("tut.png")
// palette: rgb->idx

View File

@ -1,3 +1,10 @@
Setting inferred volatile on symbol affected by address-of: setnam::filename_len in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setnam::filename in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setlfs::device in asm { ldxdevice lda#1 ldy#0 jsr$ffba }
Setting inferred volatile on symbol affected by address-of: load::address in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: load::verify in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: load::status in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: getin::ch in asm { jsr$ffe4 stach }
CONTROL FLOW GRAPH SSA

View File

@ -6,6 +6,13 @@ Fixing struct type SIZE_OF struct printf_buffer_number to 12
Setting inferred volatile on symbol affected by address-of kbhit::ch
Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height
Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height
Setting inferred volatile on symbol affected by address-of: setnam::filename_len in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setnam::filename in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setlfs::device in asm { ldxdevice lda#1 ldy#0 jsr$ffba }
Setting inferred volatile on symbol affected by address-of: load::address in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: load::verify in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: load::status in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: getin::ch in asm { jsr$ffe4 stach }
Inlined call call vera_display_set_scale_double
Inlined call call vera_display_set_scale_none
Inlined call call vera_vram_address0 vera_tile_area::mapbase VERA_INC_1

View File

@ -5,6 +5,13 @@ Fixing struct type SIZE_OF struct printf_buffer_number to 12
Setting inferred volatile on symbol affected by address-of kbhit::ch
Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height
Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height
Setting inferred volatile on symbol affected by address-of: setnam::filename_len in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setnam::filename in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setlfs::device in asm { ldxdevice lda#1 ldy#0 jsr$ffba }
Setting inferred volatile on symbol affected by address-of: load::address in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: load::verify in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: load::status in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: getin::ch in asm { jsr$ffe4 stach }
Added struct type cast to parameter value list call printf_uchar main::$10 (struct printf_format_number){ 0, 0, 0, 0, 0, DECIMAL }
Added struct type cast to parameter value list call printf_uchar main::$11 (struct printf_format_number){ 0, 0, 0, 0, 0, DECIMAL }
Added struct type cast to parameter value list call printf_uchar main::dcvideo (struct printf_format_number){ 0, 0, 0, 0, 0, HEXADECIMAL }
@ -77,6 +84,92 @@ Eliminating unused variable with no statement main::$80
CONTROL FLOW GRAPH SSA
byte toupper(byte toupper::ch)
toupper: scope:[toupper] from strupr::@2
toupper::ch#1 = phi( strupr::@2/toupper::ch#0 )
toupper::$0 = toupper::ch#1 >= 'a'
toupper::$1 = toupper::ch#1 <= 'z'
toupper::$2 = toupper::$0 && toupper::$1
if(toupper::$2) goto toupper::@1
to:toupper::@2
toupper::@1: scope:[toupper] from toupper
toupper::ch#2 = phi( toupper/toupper::ch#1 )
toupper::$3 = toupper::ch#2 + 'A'-'a'
toupper::return#0 = toupper::$3
to:toupper::@return
toupper::@2: scope:[toupper] from toupper
toupper::ch#3 = phi( toupper/toupper::ch#1 )
toupper::return#1 = toupper::ch#3
to:toupper::@return
toupper::@return: scope:[toupper] from toupper::@1 toupper::@2
toupper::return#4 = phi( toupper::@1/toupper::return#0, toupper::@2/toupper::return#1 )
toupper::return#2 = toupper::return#4
return
to:@return
byte* strupr(byte* strupr::str)
strupr: scope:[strupr] from printf_number_buffer::@11
strupr::str#1 = phi( printf_number_buffer::@11/strupr::str#0 )
strupr::src#0 = strupr::str#1
to:strupr::@1
strupr::@1: scope:[strupr] from strupr strupr::@4
strupr::str#3 = phi( strupr/strupr::str#1, strupr::@4/strupr::str#4 )
strupr::src#2 = phi( strupr/strupr::src#0, strupr::@4/strupr::src#1 )
strupr::$1 = 0 != *strupr::src#2
if(strupr::$1) goto strupr::@2
to:strupr::@3
strupr::@2: scope:[strupr] from strupr::@1
strupr::str#5 = phi( strupr::@1/strupr::str#3 )
strupr::src#3 = phi( strupr::@1/strupr::src#2 )
toupper::ch#0 = *strupr::src#3
call toupper
toupper::return#3 = toupper::return#2
to:strupr::@4
strupr::@4: scope:[strupr] from strupr::@2
strupr::str#4 = phi( strupr::@2/strupr::str#5 )
strupr::src#4 = phi( strupr::@2/strupr::src#3 )
toupper::return#5 = phi( strupr::@2/toupper::return#3 )
strupr::$0 = toupper::return#5
*strupr::src#4 = strupr::$0
strupr::src#1 = ++ strupr::src#4
to:strupr::@1
strupr::@3: scope:[strupr] from strupr::@1
strupr::str#2 = phi( strupr::@1/strupr::str#3 )
strupr::return#0 = strupr::str#2
to:strupr::@return
strupr::@return: scope:[strupr] from strupr::@3
strupr::return#3 = phi( strupr::@3/strupr::return#0 )
strupr::return#1 = strupr::return#3
return
to:@return
word strlen(byte* strlen::str)
strlen: scope:[strlen] from printf_number_buffer::@6
strlen::str#4 = phi( printf_number_buffer::@6/strlen::str#1 )
strlen::len#0 = 0
to:strlen::@1
strlen::@1: scope:[strlen] from strlen strlen::@2
strlen::len#4 = phi( strlen/strlen::len#0, strlen::@2/strlen::len#1 )
strlen::str#2 = phi( strlen/strlen::str#4, strlen::@2/strlen::str#0 )
strlen::$0 = 0 != *strlen::str#2
if(strlen::$0) goto strlen::@2
to:strlen::@3
strlen::@2: scope:[strlen] from strlen::@1
strlen::str#3 = phi( strlen::@1/strlen::str#2 )
strlen::len#2 = phi( strlen::@1/strlen::len#4 )
strlen::len#1 = ++ strlen::len#2
strlen::str#0 = ++ strlen::str#3
to:strlen::@1
strlen::@3: scope:[strlen] from strlen::@1
strlen::len#3 = phi( strlen::@1/strlen::len#4 )
strlen::return#0 = strlen::len#3
to:strlen::@return
strlen::@return: scope:[strlen] from strlen::@3
strlen::return#3 = phi( strlen::@3/strlen::return#0 )
strlen::return#1 = strlen::return#3
return
to:@return
void memcpy_in_vram(byte memcpy_in_vram::dest_bank , void* memcpy_in_vram::dest , byte memcpy_in_vram::dest_increment , byte memcpy_in_vram::src_bank , void* memcpy_in_vram::src , byte memcpy_in_vram::src_increment , word memcpy_in_vram::num)
memcpy_in_vram: scope:[memcpy_in_vram] from insertup::@2
memcpy_in_vram::num#2 = phi( insertup::@2/memcpy_in_vram::num#0 )
@ -749,92 +842,6 @@ vera_layer_mode_text::@return: scope:[vera_layer_mode_text] from vera_layer_mod
return
to:@return
byte toupper(byte toupper::ch)
toupper: scope:[toupper] from strupr::@2
toupper::ch#1 = phi( strupr::@2/toupper::ch#0 )
toupper::$0 = toupper::ch#1 >= 'a'
toupper::$1 = toupper::ch#1 <= 'z'
toupper::$2 = toupper::$0 && toupper::$1
if(toupper::$2) goto toupper::@1
to:toupper::@2
toupper::@1: scope:[toupper] from toupper
toupper::ch#2 = phi( toupper/toupper::ch#1 )
toupper::$3 = toupper::ch#2 + 'A'-'a'
toupper::return#0 = toupper::$3
to:toupper::@return
toupper::@2: scope:[toupper] from toupper
toupper::ch#3 = phi( toupper/toupper::ch#1 )
toupper::return#1 = toupper::ch#3
to:toupper::@return
toupper::@return: scope:[toupper] from toupper::@1 toupper::@2
toupper::return#4 = phi( toupper::@1/toupper::return#0, toupper::@2/toupper::return#1 )
toupper::return#2 = toupper::return#4
return
to:@return
byte* strupr(byte* strupr::str)
strupr: scope:[strupr] from printf_number_buffer::@11
strupr::str#1 = phi( printf_number_buffer::@11/strupr::str#0 )
strupr::src#0 = strupr::str#1
to:strupr::@1
strupr::@1: scope:[strupr] from strupr strupr::@4
strupr::str#3 = phi( strupr/strupr::str#1, strupr::@4/strupr::str#4 )
strupr::src#2 = phi( strupr/strupr::src#0, strupr::@4/strupr::src#1 )
strupr::$1 = 0 != *strupr::src#2
if(strupr::$1) goto strupr::@2
to:strupr::@3
strupr::@2: scope:[strupr] from strupr::@1
strupr::str#5 = phi( strupr::@1/strupr::str#3 )
strupr::src#3 = phi( strupr::@1/strupr::src#2 )
toupper::ch#0 = *strupr::src#3
call toupper
toupper::return#3 = toupper::return#2
to:strupr::@4
strupr::@4: scope:[strupr] from strupr::@2
strupr::str#4 = phi( strupr::@2/strupr::str#5 )
strupr::src#4 = phi( strupr::@2/strupr::src#3 )
toupper::return#5 = phi( strupr::@2/toupper::return#3 )
strupr::$0 = toupper::return#5
*strupr::src#4 = strupr::$0
strupr::src#1 = ++ strupr::src#4
to:strupr::@1
strupr::@3: scope:[strupr] from strupr::@1
strupr::str#2 = phi( strupr::@1/strupr::str#3 )
strupr::return#0 = strupr::str#2
to:strupr::@return
strupr::@return: scope:[strupr] from strupr::@3
strupr::return#3 = phi( strupr::@3/strupr::return#0 )
strupr::return#1 = strupr::return#3
return
to:@return
word strlen(byte* strlen::str)
strlen: scope:[strlen] from printf_number_buffer::@6
strlen::str#4 = phi( printf_number_buffer::@6/strlen::str#1 )
strlen::len#0 = 0
to:strlen::@1
strlen::@1: scope:[strlen] from strlen strlen::@2
strlen::len#4 = phi( strlen/strlen::len#0, strlen::@2/strlen::len#1 )
strlen::str#2 = phi( strlen/strlen::str#4, strlen::@2/strlen::str#0 )
strlen::$0 = 0 != *strlen::str#2
if(strlen::$0) goto strlen::@2
to:strlen::@3
strlen::@2: scope:[strlen] from strlen::@1
strlen::str#3 = phi( strlen::@1/strlen::str#2 )
strlen::len#2 = phi( strlen::@1/strlen::len#4 )
strlen::len#1 = ++ strlen::len#2
strlen::str#0 = ++ strlen::str#3
to:strlen::@1
strlen::@3: scope:[strlen] from strlen::@1
strlen::len#3 = phi( strlen::@1/strlen::len#4 )
strlen::return#0 = strlen::len#3
to:strlen::@return
strlen::@return: scope:[strlen] from strlen::@3
strlen::return#3 = phi( strlen::@3/strlen::return#0 )
strlen::return#1 = strlen::return#3
return
to:@return
void conio_x16_init()
conio_x16_init: scope:[conio_x16_init] from __start::__init1
CONIO_SCREEN_TEXT#64 = phi( __start::__init1/CONIO_SCREEN_TEXT#8 )
@ -5596,6 +5603,8 @@ const dword* vera_tilebase_address[2] = { 0, 0 }
const byte* vera_tilebase_bank[2] = { 0, 0 }
const word* vera_tilebase_offset[2] = { 0, 0 }
Adding number conversion cast (unumber) 0 in strupr::$1 = 0 != *strupr::src#2
Adding number conversion cast (unumber) 0 in strlen::$0 = 0 != *strlen::str#2
Adding number conversion cast (unumber) 0 in vera_layer_get_color::$4 = 0 != vera_layer_get_color::$0
Adding number conversion cast (unumber) 4 in vera_layer_get_color::$1 = vera_layer_backcolor[vera_layer_get_color::layer#4] << 4
Adding number conversion cast (unumber) 1 in if(vera_layer_mode_tile::color_depth#1==1) goto vera_layer_mode_tile::@4
@ -5627,8 +5636,6 @@ Adding number conversion cast (unumber) $10 in if(vera_layer_mode_tile::tileheig
Adding number conversion cast (unumber) 1 in vera_layer_mode_tile::color_depth#0 = 1
Adding number conversion cast (unumber) $10 in if(vera_layer_mode_text::color_mode#1==$10) goto vera_layer_mode_text::@2
Adding number conversion cast (unumber) $100 in if(vera_layer_mode_text::color_mode#2==$100) goto vera_layer_mode_text::@3
Adding number conversion cast (unumber) 0 in strupr::$1 = 0 != *strupr::src#2
Adding number conversion cast (unumber) 0 in strlen::$0 = 0 != *strlen::str#2
Adding number conversion cast (unumber) 1 in vera_layer_mode_text::layer#0 = 1
Adding number conversion cast (unumber) $80 in vera_layer_mode_text::mapwidth#0 = $80
Adding number conversion cast (unumber) $40 in vera_layer_mode_text::mapheight#0 = $40
@ -5858,6 +5865,8 @@ Simplifying constant pointer cast (byte*) 214
Simplifying constant pointer cast (byte*) 650
Simplifying constant pointer cast (byte*) 65508
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 4
Simplifying constant integer cast 1
Simplifying constant integer cast 2
@ -5888,8 +5897,6 @@ Simplifying constant integer cast $10
Simplifying constant integer cast 1
Simplifying constant integer cast $10
Simplifying constant integer cast $100
Simplifying constant integer cast 0
Simplifying constant integer cast 0
Simplifying constant integer cast 1
Simplifying constant integer cast 0
Simplifying constant integer cast $f800
@ -5994,6 +6001,8 @@ Simplifying constant integer cast $13
Simplifying constant integer cast $c
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 4
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) 2
@ -6024,8 +6033,6 @@ Finalized unsigned number type (byte) $10
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $10
Finalized unsigned number type (word) $100
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) 1
Finalized unsigned number type (byte) $80
Finalized unsigned number type (byte) $40
@ -6162,6 +6169,15 @@ Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 =
Alias candidate removed (volatile)conio_rowshift = screenlayer::$3
Alias candidate removed (volatile)conio_rowskip = screenlayer::$4
Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#2 screenlayer::vera_layer_get_height1_return#1 screenlayer::vera_layer_get_height1_return#3 screenlayer::$5 conio_height
Alias toupper::ch#1 = toupper::ch#2 toupper::ch#3 toupper::return#1
Alias toupper::return#0 = toupper::$3
Alias toupper::return#2 = toupper::return#4
Alias strupr::src#0 = strupr::str#1
Alias strupr::src#2 = strupr::src#3 strupr::src#4
Alias strupr::str#2 = strupr::str#5 strupr::str#3 strupr::str#4 strupr::return#0 strupr::return#3 strupr::return#1
Alias toupper::return#3 = toupper::return#5
Alias strlen::len#2 = strlen::len#4 strlen::len#3 strlen::return#0 strlen::return#3 strlen::return#1
Alias strlen::str#2 = strlen::str#3
Alias memcpy_in_vram::i#2 = memcpy_in_vram::i#3
Alias memcpy_in_vram::num#1 = memcpy_in_vram::num#3
Alias vera_layer_get_config::return#0 = vera_layer_get_config::return#6 vera_layer_get_config::return#1
@ -6217,15 +6233,6 @@ Alias vera_layer_mode_tile::layer#18 = vera_layer_mode_tile::layer#19 vera_layer
Alias vera_layer_mode_tile::tileheight#1 = vera_layer_mode_tile::tileheight#2
Alias vera_layer_mode_text::color_mode#1 = vera_layer_mode_text::color_mode#3 vera_layer_mode_text::color_mode#2
Alias vera_layer_mode_text::layer#1 = vera_layer_mode_text::layer#4 vera_layer_mode_text::layer#2 vera_layer_mode_text::layer#5 vera_layer_mode_text::layer#3
Alias toupper::ch#1 = toupper::ch#2 toupper::ch#3 toupper::return#1
Alias toupper::return#0 = toupper::$3
Alias toupper::return#2 = toupper::return#4
Alias strupr::src#0 = strupr::str#1
Alias strupr::src#2 = strupr::src#3 strupr::src#4
Alias strupr::str#2 = strupr::str#5 strupr::str#3 strupr::str#4 strupr::return#0 strupr::return#3 strupr::return#1
Alias toupper::return#3 = toupper::return#5
Alias strlen::len#2 = strlen::len#4 strlen::len#3 strlen::return#0 strlen::return#3 strlen::return#1
Alias strlen::str#2 = strlen::str#3
Alias CONIO_SCREEN_BANK#24 = CONIO_SCREEN_BANK#34 CONIO_SCREEN_BANK#44
Alias CONIO_SCREEN_TEXT#26 = CONIO_SCREEN_TEXT#45 CONIO_SCREEN_TEXT#64
Alias conio_x16_init::line#0 = conio_x16_init::line#9 conio_x16_init::line#8 conio_x16_init::line#7 conio_x16_init::line#6 conio_x16_init::line#5 conio_x16_init::line#4 conio_x16_init::line#2
@ -6521,6 +6528,10 @@ Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 =
Alias candidate removed (volatile)conio_rowshift = screenlayer::$3
Alias candidate removed (volatile)conio_rowskip = screenlayer::$4
Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#2 screenlayer::vera_layer_get_height1_return#1 screenlayer::vera_layer_get_height1_return#3 screenlayer::$5 conio_height
Identical Phi Values toupper::ch#1 toupper::ch#0
Identical Phi Values strupr::src#0 strupr::str#0
Identical Phi Values strupr::str#2 strupr::src#0
Identical Phi Values strlen::str#4 strlen::str#1
Identical Phi Values memcpy_in_vram::src#1 memcpy_in_vram::src#0
Identical Phi Values memcpy_in_vram::src_increment#1 memcpy_in_vram::src_increment#0
Identical Phi Values memcpy_in_vram::src_bank#1 memcpy_in_vram::src_bank#0
@ -6551,10 +6562,6 @@ Identical Phi Values vera_layer_mode_text::mapheight#1 vera_layer_mode_text::map
Identical Phi Values vera_layer_mode_text::tilewidth#1 vera_layer_mode_text::tilewidth#0
Identical Phi Values vera_layer_mode_text::tileheight#1 vera_layer_mode_text::tileheight#0
Identical Phi Values vera_layer_mode_text::color_mode#1 vera_layer_mode_text::color_mode#0
Identical Phi Values toupper::ch#1 toupper::ch#0
Identical Phi Values strupr::src#0 strupr::str#0
Identical Phi Values strupr::str#2 strupr::src#0
Identical Phi Values strlen::str#4 strlen::str#1
Identical Phi Values CONIO_SCREEN_BANK#24 CONIO_SCREEN_BANK#8
Identical Phi Values CONIO_SCREEN_TEXT#26 CONIO_SCREEN_TEXT#8
Identical Phi Values CONIO_SCREEN_BANK#0 CONIO_SCREEN_BANK#116
@ -6641,10 +6648,10 @@ Identical Phi Values CONIO_SCREEN_BANK#15 CONIO_SCREEN_BANK#116
Successful SSA optimization Pass2IdenticalPhiElimination
Identical Phi Values CONIO_SCREEN_TEXT#16 CONIO_SCREEN_TEXT#134
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition memcpy_in_vram::$6 [18] if(memcpy_in_vram::i#2<memcpy_in_vram::num#0) goto memcpy_in_vram::@2
Simple Condition vera_layer_get_color::$4 [84] if(0!=vera_layer_get_color::$0) goto vera_layer_get_color::@1
Simple Condition strupr::$1 [209] if(0!=*strupr::src#2) goto strupr::@2
Simple Condition strlen::$0 [221] if(0!=*strlen::str#2) goto strlen::@2
Simple Condition strupr::$1 [11] if(0!=*strupr::src#2) goto strupr::@2
Simple Condition strlen::$0 [23] if(0!=*strlen::str#2) goto strlen::@2
Simple Condition memcpy_in_vram::$6 [45] if(memcpy_in_vram::i#2<memcpy_in_vram::num#0) goto memcpy_in_vram::@2
Simple Condition vera_layer_get_color::$4 [111] if(0!=vera_layer_get_color::$0) goto vera_layer_get_color::@1
Simple Condition conio_x16_init::$8 [257] if(conio_x16_init::line#0<conio_screen_height) goto conio_x16_init::@1
Simple Condition clrscr::$4 [285] if(clrscr::l#2<conio_height) goto clrscr::@2
Simple Condition clrscr::$8 [300] if(clrscr::c#2<conio_width) goto clrscr::@5
@ -6680,7 +6687,7 @@ Simple Condition main::$86 [910] if(0==main::$85) goto main::@5
Simple Condition main::$88 [954] if(0==main::$87) goto main::@7
Simple Condition main::$90 [999] if(0==main::$89) goto main::@9
Successful SSA optimization Pass2ConditionalJumpSimplification
Rewriting && if()-condition to two if()s [201] toupper::$2 = toupper::$0 && toupper::$1
Rewriting && if()-condition to two if()s [3] toupper::$2 = toupper::$0 && toupper::$1
Rewriting ! if()-condition to reversed if() [523] uctoa::$8 = ! uctoa::$7
Rewriting || if()-condition to two if()s [522] uctoa::$7 = uctoa::started#2 || uctoa::$6
Rewriting ! if()-condition to reversed if() [586] printf_number_buffer::$5 = ! printf_number_buffer::$4
@ -6698,17 +6705,17 @@ Warning! Adding boolean cast to non-boolean condition printf_number_buffer::form
Warning! Adding boolean cast to non-boolean condition printf_number_buffer::padding#10
Warning! Adding boolean cast to non-boolean condition printf_number_buffer::padding#10
Warning! Adding boolean cast to non-boolean condition printf_number_buffer::padding#10
Negating conditional jump and destination [105] if(vera_layer_mode_tile::color_depth#0!=8) goto vera_layer_mode_tile::@8
Negating conditional jump and destination [123] if(vera_layer_mode_tile::mapwidth#0!=$100) goto vera_layer_mode_tile::@16
Negating conditional jump and destination [135] if(vera_layer_mode_tile::mapheight#0!=$100) goto vera_layer_mode_tile::@24
Negating conditional jump and destination [167] if(vera_layer_mode_tile::tilewidth#0!=$10) goto vera_layer_mode_tile::@28
Negating conditional jump and destination [172] if(vera_layer_mode_tile::tileheight#0!=$10) goto vera_layer_mode_tile::@32
Negating conditional jump and destination [132] if(vera_layer_mode_tile::color_depth#0!=8) goto vera_layer_mode_tile::@8
Negating conditional jump and destination [150] if(vera_layer_mode_tile::mapwidth#0!=$100) goto vera_layer_mode_tile::@16
Negating conditional jump and destination [162] if(vera_layer_mode_tile::mapheight#0!=$100) goto vera_layer_mode_tile::@24
Negating conditional jump and destination [194] if(vera_layer_mode_tile::tilewidth#0!=$10) goto vera_layer_mode_tile::@28
Negating conditional jump and destination [199] if(vera_layer_mode_tile::tileheight#0!=$10) goto vera_layer_mode_tile::@32
Constant strlen::len#0 = 0
Constant memcpy_in_vram::i#0 = 0
Constant vera_layer_mode_tile::config#0 = 0
Constant vera_layer_mode_tile::color_depth#0 = 1
Constant vera_layer_set_text_color_mode::color_mode#0 = VERA_LAYER_CONFIG_16C
Constant vera_layer_set_text_color_mode::color_mode#1 = VERA_LAYER_CONFIG_256C
Constant strlen::len#0 = 0
Constant vera_layer_mode_text::layer#0 = 1
Constant vera_layer_mode_text::mapbase_address#0 = 0
Constant vera_layer_mode_text::tilebase_address#0 = $f800
@ -6971,24 +6978,24 @@ Constant vera_layer_set_mapbase::layer#0 = vera_layer_mode_tile::layer#0
Constant vera_layer_set_tilebase::layer#0 = vera_layer_mode_tile::layer#0
Constant strupr::return#2 = strupr::str#0
Successful SSA optimization Pass2ConstantIdentification
if() condition always true - replacing block destination [99] if(vera_layer_mode_tile::color_depth#0==1) goto vera_layer_mode_tile::@4
if() condition always false - eliminating [101] if(vera_layer_mode_tile::color_depth#0==2) goto vera_layer_mode_tile::@5
if() condition always false - eliminating [103] if(vera_layer_mode_tile::color_depth#0==4) goto vera_layer_mode_tile::@6
if() condition always true - replacing block destination [105] if(vera_layer_mode_tile::color_depth#0!=8) goto vera_layer_mode_tile::@8
if() condition always false - eliminating [108] if(vera_layer_mode_tile::mapwidth#0==$20) goto vera_layer_mode_tile::@12
if() condition always false - eliminating [113] if(vera_layer_mode_tile::mapwidth#0==$40) goto vera_layer_mode_tile::@13
if() condition always true - replacing block destination [118] if(vera_layer_mode_tile::mapwidth#0==$80) goto vera_layer_mode_tile::@14
if() condition always true - replacing block destination [123] if(vera_layer_mode_tile::mapwidth#0!=$100) goto vera_layer_mode_tile::@16
if() condition always false - eliminating [129] if(vera_layer_mode_tile::mapheight#0==$20) goto vera_layer_mode_tile::@20
if() condition always true - replacing block destination [131] if(vera_layer_mode_tile::mapheight#0==$40) goto vera_layer_mode_tile::@21
if() condition always false - eliminating [133] if(vera_layer_mode_tile::mapheight#0==$80) goto vera_layer_mode_tile::@22
if() condition always true - replacing block destination [135] if(vera_layer_mode_tile::mapheight#0!=$100) goto vera_layer_mode_tile::@24
if() condition always true - replacing block destination [165] if(vera_layer_mode_tile::tilewidth#0==8) goto vera_layer_mode_tile::@26
if() condition always true - replacing block destination [167] if(vera_layer_mode_tile::tilewidth#0!=$10) goto vera_layer_mode_tile::@28
if() condition always true - replacing block destination [170] if(vera_layer_mode_tile::tileheight#0==8) goto vera_layer_mode_tile::@30
if() condition always true - replacing block destination [172] if(vera_layer_mode_tile::tileheight#0!=$10) goto vera_layer_mode_tile::@32
if() condition always true - replacing block destination [189] if(vera_layer_mode_text::color_mode#0==$10) goto vera_layer_mode_text::@2
if() condition always false - eliminating [193] if(vera_layer_mode_text::color_mode#0==$100) goto vera_layer_mode_text::@3
if() condition always true - replacing block destination [126] if(vera_layer_mode_tile::color_depth#0==1) goto vera_layer_mode_tile::@4
if() condition always false - eliminating [128] if(vera_layer_mode_tile::color_depth#0==2) goto vera_layer_mode_tile::@5
if() condition always false - eliminating [130] if(vera_layer_mode_tile::color_depth#0==4) goto vera_layer_mode_tile::@6
if() condition always true - replacing block destination [132] if(vera_layer_mode_tile::color_depth#0!=8) goto vera_layer_mode_tile::@8
if() condition always false - eliminating [135] if(vera_layer_mode_tile::mapwidth#0==$20) goto vera_layer_mode_tile::@12
if() condition always false - eliminating [140] if(vera_layer_mode_tile::mapwidth#0==$40) goto vera_layer_mode_tile::@13
if() condition always true - replacing block destination [145] if(vera_layer_mode_tile::mapwidth#0==$80) goto vera_layer_mode_tile::@14
if() condition always true - replacing block destination [150] if(vera_layer_mode_tile::mapwidth#0!=$100) goto vera_layer_mode_tile::@16
if() condition always false - eliminating [156] if(vera_layer_mode_tile::mapheight#0==$20) goto vera_layer_mode_tile::@20
if() condition always true - replacing block destination [158] if(vera_layer_mode_tile::mapheight#0==$40) goto vera_layer_mode_tile::@21
if() condition always false - eliminating [160] if(vera_layer_mode_tile::mapheight#0==$80) goto vera_layer_mode_tile::@22
if() condition always true - replacing block destination [162] if(vera_layer_mode_tile::mapheight#0!=$100) goto vera_layer_mode_tile::@24
if() condition always true - replacing block destination [192] if(vera_layer_mode_tile::tilewidth#0==8) goto vera_layer_mode_tile::@26
if() condition always true - replacing block destination [194] if(vera_layer_mode_tile::tilewidth#0!=$10) goto vera_layer_mode_tile::@28
if() condition always true - replacing block destination [197] if(vera_layer_mode_tile::tileheight#0==8) goto vera_layer_mode_tile::@30
if() condition always true - replacing block destination [199] if(vera_layer_mode_tile::tileheight#0!=$10) goto vera_layer_mode_tile::@32
if() condition always true - replacing block destination [216] if(vera_layer_mode_text::color_mode#0==$10) goto vera_layer_mode_text::@2
if() condition always false - eliminating [220] if(vera_layer_mode_text::color_mode#0==$100) goto vera_layer_mode_text::@3
Successful SSA optimization Pass2ConstantIfs
Consolidated constant strings into main::s
Consolidated constant strings into main::s4
@ -6998,16 +7005,16 @@ Consolidated constant strings into main::s22
Consolidated constant strings into main::s27
Consolidated constant strings into main::s32
Successful SSA optimization Pass2ConstantStringConsolidation
Simplifying expression containing zero memcpy_in_vram::src_increment#0 in [6] memcpy_in_vram::$2 = memcpy_in_vram::src_increment#0 | memcpy_in_vram::src_bank#0
Simplifying expression containing zero memcpy_in_vram::dest_increment#0 in [13] memcpy_in_vram::$5 = memcpy_in_vram::dest_increment#0 | memcpy_in_vram::dest_bank#0
Simplifying expression containing zero VERA_LAYER_COLOR_DEPTH_1BPP in [100] vera_layer_mode_tile::config#1 = vera_layer_mode_tile::config#0 | VERA_LAYER_COLOR_DEPTH_1BPP
Simplifying expression containing zero VERA_LAYER_COLOR_DEPTH_2BPP in [102] vera_layer_mode_tile::config#2 = vera_layer_mode_tile::config#0 | VERA_LAYER_COLOR_DEPTH_2BPP
Simplifying expression containing zero VERA_LAYER_COLOR_DEPTH_4BPP in [104] vera_layer_mode_tile::config#3 = vera_layer_mode_tile::config#0 | VERA_LAYER_COLOR_DEPTH_4BPP
Simplifying expression containing zero VERA_LAYER_COLOR_DEPTH_8BPP in [106] vera_layer_mode_tile::config#4 = vera_layer_mode_tile::config#0 | VERA_LAYER_COLOR_DEPTH_8BPP
Simplifying expression containing zero vera_layer_mode_tile::config#17 in [109] vera_layer_mode_tile::config#5 = vera_layer_mode_tile::config#17 | VERA_LAYER_WIDTH_32
Simplifying expression containing zero vera_layer_mode_tile::config#21 in [130] vera_layer_mode_tile::config#9 = vera_layer_mode_tile::config#21 | VERA_LAYER_HEIGHT_32
Simplifying expression containing zero vera_layer_mode_tile::tilebase#1 in [166] vera_layer_mode_tile::tilebase#2 = vera_layer_mode_tile::tilebase#1 | VERA_TILEBASE_WIDTH_8
Simplifying expression containing zero vera_layer_mode_tile::tilebase#12 in [171] vera_layer_mode_tile::tilebase#4 = vera_layer_mode_tile::tilebase#12 | VERA_TILEBASE_HEIGHT_8
Simplifying expression containing zero memcpy_in_vram::src_increment#0 in [33] memcpy_in_vram::$2 = memcpy_in_vram::src_increment#0 | memcpy_in_vram::src_bank#0
Simplifying expression containing zero memcpy_in_vram::dest_increment#0 in [40] memcpy_in_vram::$5 = memcpy_in_vram::dest_increment#0 | memcpy_in_vram::dest_bank#0
Simplifying expression containing zero VERA_LAYER_COLOR_DEPTH_1BPP in [127] vera_layer_mode_tile::config#1 = vera_layer_mode_tile::config#0 | VERA_LAYER_COLOR_DEPTH_1BPP
Simplifying expression containing zero VERA_LAYER_COLOR_DEPTH_2BPP in [129] vera_layer_mode_tile::config#2 = vera_layer_mode_tile::config#0 | VERA_LAYER_COLOR_DEPTH_2BPP
Simplifying expression containing zero VERA_LAYER_COLOR_DEPTH_4BPP in [131] vera_layer_mode_tile::config#3 = vera_layer_mode_tile::config#0 | VERA_LAYER_COLOR_DEPTH_4BPP
Simplifying expression containing zero VERA_LAYER_COLOR_DEPTH_8BPP in [133] vera_layer_mode_tile::config#4 = vera_layer_mode_tile::config#0 | VERA_LAYER_COLOR_DEPTH_8BPP
Simplifying expression containing zero vera_layer_mode_tile::config#17 in [136] vera_layer_mode_tile::config#5 = vera_layer_mode_tile::config#17 | VERA_LAYER_WIDTH_32
Simplifying expression containing zero vera_layer_mode_tile::config#21 in [157] vera_layer_mode_tile::config#9 = vera_layer_mode_tile::config#21 | VERA_LAYER_HEIGHT_32
Simplifying expression containing zero vera_layer_mode_tile::tilebase#1 in [193] vera_layer_mode_tile::tilebase#2 = vera_layer_mode_tile::tilebase#1 | VERA_TILEBASE_WIDTH_8
Simplifying expression containing zero vera_layer_mode_tile::tilebase#12 in [198] vera_layer_mode_tile::tilebase#4 = vera_layer_mode_tile::tilebase#12 | VERA_TILEBASE_HEIGHT_8
Simplifying expression containing zero (byte*)&printf_buffer in [562] *((byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN) = printf_uchar::$2
Simplifying expression containing zero (byte*)&printf_buffer in [567] printf_number_buffer::buffer_sign#0 = *((byte*)&printf_buffer+OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN)
Simplifying expression containing zero vera_layer_enable in [813] main::vera_layer_is_visible2_return#0 = *VERA_DC_VIDEO & vera_layer_enable[main::vera_layer_is_visible2_layer#0]
@ -7046,6 +7053,7 @@ Eliminating unused constant VERA_LAYER_WIDTH_32
Eliminating unused constant VERA_LAYER_HEIGHT_32
Eliminating unused constant VERA_TILEBASE_WIDTH_8
Eliminating unused constant VERA_TILEBASE_HEIGHT_8
Eliminating unused constant strupr::return#2
Eliminating unused constant memcpy_in_vram::dest_bank#0
Eliminating unused constant memcpy_in_vram::src_bank#0
Eliminating unused constant vera_layer_mode_tile::color_depth#0
@ -7054,7 +7062,6 @@ Eliminating unused constant vera_layer_mode_tile::mapheight#0
Eliminating unused constant vera_layer_mode_tile::tilewidth#0
Eliminating unused constant vera_layer_mode_tile::tileheight#0
Eliminating unused constant vera_layer_mode_text::color_mode#0
Eliminating unused constant strupr::return#2
Eliminating unused constant cputs::c#0
Eliminating unused constant uctoa::max_digits#0
Eliminating unused constant uctoa::digit_values#0
@ -7067,8 +7074,8 @@ Eliminating unused constant OFFSET_STRUCT_PRINTF_BUFFER_NUMBER_SIGN
Eliminating unused constant CONIO_SCREEN_TEXT#8
Eliminating unused constant CONIO_SCREEN_BANK#8
Successful SSA optimization PassNEliminateUnusedVars
Eliminating unused variable vera_layer_set_textcolor::return#0 and assignment [61] vera_layer_set_textcolor::return#0 = vera_layer_textcolor[vera_layer_set_textcolor::layer#13]
Eliminating unused variable vera_layer_set_backcolor::return#0 and assignment [67] vera_layer_set_backcolor::return#0 = vera_layer_backcolor[vera_layer_set_backcolor::layer#10]
Eliminating unused variable vera_layer_set_textcolor::return#0 and assignment [81] vera_layer_set_textcolor::return#0 = vera_layer_textcolor[vera_layer_set_textcolor::layer#13]
Eliminating unused variable vera_layer_set_backcolor::return#0 and assignment [87] vera_layer_set_backcolor::return#0 = vera_layer_backcolor[vera_layer_set_backcolor::layer#10]
Eliminating unused variable vera_layer_get_config::return#4 and assignment [538] vera_layer_get_config::return#4 = vera_layer_get_config::return#0
Eliminating unused constant DEFAULT_SCREEN
Eliminating unused constant vera_layer_mode_text::mapwidth#0
@ -7170,7 +7177,7 @@ Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 =
Identical Phi Values vera_layer_set_text_color_mode::layer#2 vera_layer_set_text_color_mode::layer#0
Identical Phi Values vera_layer_set_text_color_mode::color_mode#2 vera_layer_set_text_color_mode::color_mode#0
Successful SSA optimization Pass2IdenticalPhiElimination
Simple Condition toupper::$0 [124] if(toupper::ch#0>='a') goto toupper::@3
Simple Condition toupper::$0 [2] if(toupper::ch#0>='a') goto toupper::@3
Simple Condition uctoa::$11 [360] if(0!=uctoa::started#2) goto uctoa::@14
Simple Condition printf_number_buffer::$1 [404] if(0==printf_number_buffer::format_justify_left#0) goto printf_number_buffer::@23
Simple Condition printf_number_buffer::$33 [419] if(0!=printf_number_buffer::format_zero_padding#0) goto printf_number_buffer::@24
@ -7183,25 +7190,25 @@ Simple Condition printf_number_buffer::$36 [624] if(0!=printf_number_buffer::pad
Simple Condition printf_number_buffer::$37 [626] if(0!=printf_number_buffer::padding#10) goto printf_number_buffer::@12
Simple Condition printf_number_buffer::$14 [627] if(0==printf_number_buffer::format_zero_padding#0) goto printf_number_buffer::@25
Successful SSA optimization Pass2ConditionalJumpSimplification
Negating conditional jump and destination [124] if(toupper::ch#0<'a') goto toupper::@2
Negating conditional jump and destination [2] if(toupper::ch#0<'a') goto toupper::@2
Negating conditional jump and destination [404] if(0!=printf_number_buffer::format_justify_left#0) goto printf_number_buffer::@2
Negating conditional jump and destination [419] if(0==printf_number_buffer::format_zero_padding#0) goto printf_number_buffer::@4
Negating conditional jump and destination [428] if(0==printf_number_buffer::format_justify_left#0) goto printf_number_buffer::@return
Negating conditional jump and destination [622] if(0!=printf_number_buffer::format_zero_padding#0) goto printf_number_buffer::@2
Negating conditional jump and destination [627] if(0!=printf_number_buffer::format_zero_padding#0) goto printf_number_buffer::@return
Successful SSA optimization Pass2ConditionalJumpSequenceImprovement
Constant right-side identified [30] vera_layer_set_text_color_mode::$0 = vera_layer_set_text_color_mode::layer#0 * SIZEOF_POINTER
Constant right-side identified [88] vera_layer_mode_tile::$15 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD
Constant right-side identified [93] vera_layer_mode_tile::$1 = < vera_layer_mode_tile::mapbase_address#1
Constant right-side identified [94] vera_layer_mode_tile::$17 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD
Constant right-side identified [96] vera_layer_mode_tile::$2 = > vera_layer_mode_tile::mapbase_address#1
Constant right-side identified [98] vera_layer_mode_tile::$18 = vera_layer_mode_tile::layer#0 * SIZEOF_DWORD
Constant right-side identified [100] vera_layer_mode_tile::mapbase_address#0 = vera_layer_mode_tile::mapbase_address#1 >> 1
Constant right-side identified [105] vera_layer_mode_tile::$7 = < vera_layer_mode_tile::tilebase_address#1
Constant right-side identified [106] vera_layer_mode_tile::$19 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD
Constant right-side identified [108] vera_layer_mode_tile::$8 = > vera_layer_mode_tile::tilebase_address#1
Constant right-side identified [110] vera_layer_mode_tile::$20 = vera_layer_mode_tile::layer#0 * SIZEOF_DWORD
Constant right-side identified [112] vera_layer_mode_tile::tilebase_address#0 = vera_layer_mode_tile::tilebase_address#1 >> 1
Constant right-side identified [50] vera_layer_set_text_color_mode::$0 = vera_layer_set_text_color_mode::layer#0 * SIZEOF_POINTER
Constant right-side identified [108] vera_layer_mode_tile::$15 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD
Constant right-side identified [113] vera_layer_mode_tile::$1 = < vera_layer_mode_tile::mapbase_address#1
Constant right-side identified [114] vera_layer_mode_tile::$17 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD
Constant right-side identified [116] vera_layer_mode_tile::$2 = > vera_layer_mode_tile::mapbase_address#1
Constant right-side identified [118] vera_layer_mode_tile::$18 = vera_layer_mode_tile::layer#0 * SIZEOF_DWORD
Constant right-side identified [120] vera_layer_mode_tile::mapbase_address#0 = vera_layer_mode_tile::mapbase_address#1 >> 1
Constant right-side identified [125] vera_layer_mode_tile::$7 = < vera_layer_mode_tile::tilebase_address#1
Constant right-side identified [126] vera_layer_mode_tile::$19 = vera_layer_mode_tile::layer#0 * SIZEOF_WORD
Constant right-side identified [128] vera_layer_mode_tile::$8 = > vera_layer_mode_tile::tilebase_address#1
Constant right-side identified [130] vera_layer_mode_tile::$20 = vera_layer_mode_tile::layer#0 * SIZEOF_DWORD
Constant right-side identified [132] vera_layer_mode_tile::tilebase_address#0 = vera_layer_mode_tile::tilebase_address#1 >> 1
Constant right-side identified [346] uctoa::buffer#0 = ++ uctoa::buffer#5
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant memcpy_in_vram::$2 = memcpy_in_vram::src_increment#0
@ -7221,18 +7228,18 @@ Constant vera_layer_mode_tile::$20 = vera_layer_mode_tile::layer#0*SIZEOF_DWORD
Constant vera_layer_mode_tile::tilebase_address#0 = vera_layer_mode_tile::tilebase_address#1>>1
Constant uctoa::buffer#0 = ++uctoa::buffer#5
Successful SSA optimization Pass2ConstantIdentification
Constant value identified (byte)vera_layer_mode_tile::$2 in [97] vera_mapbase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$2
Constant value identified (byte)vera_layer_mode_tile::$8 in [109] vera_tilebase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$8
Constant value identified (byte)vera_layer_mode_tile::$2 in [117] vera_mapbase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$2
Constant value identified (byte)vera_layer_mode_tile::$8 in [129] vera_tilebase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$8
Successful SSA optimization Pass2ConstantValues
Simplifying constant evaluating to zero <vera_layer_mode_tile::mapbase_address#1 in
Simplifying constant evaluating to zero >vera_layer_mode_tile::mapbase_address#1 in
Simplifying constant evaluating to zero vera_layer_mode_tile::mapbase_address#1>>1 in
Simplifying constant evaluating to zero >vera_layer_mode_tile::tilebase_address#1 in
Simplifying constant evaluating to zero (byte)vera_layer_mode_tile::$2 in [97] vera_mapbase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$2
Simplifying constant evaluating to zero (byte)vera_layer_mode_tile::$8 in [109] vera_tilebase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$8
Simplifying constant evaluating to zero (byte)vera_layer_mode_tile::$2 in [117] vera_mapbase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$2
Simplifying constant evaluating to zero (byte)vera_layer_mode_tile::$8 in [129] vera_tilebase_bank[vera_layer_mode_tile::layer#0] = (byte)vera_layer_mode_tile::$8
Successful SSA optimization PassNSimplifyConstantZero
Simplifying expression containing zero *vera_layer_set_text_color_mode::addr#0 in [33] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 | vera_layer_set_text_color_mode::color_mode#0
Simplifying expression containing zero VERA_LAYER_WIDTH_128 in [86] vera_layer_mode_tile::config#21 = vera_layer_mode_tile::config#1 | VERA_LAYER_WIDTH_128
Simplifying expression containing zero *vera_layer_set_text_color_mode::addr#0 in [53] *vera_layer_set_text_color_mode::addr#0 = *vera_layer_set_text_color_mode::addr#0 | vera_layer_set_text_color_mode::color_mode#0
Simplifying expression containing zero VERA_LAYER_WIDTH_128 in [106] vera_layer_mode_tile::config#21 = vera_layer_mode_tile::config#1 | VERA_LAYER_WIDTH_128
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused constant VERA_LAYER_WIDTH_64
Eliminating unused constant VERA_LAYER_WIDTH_256
@ -7259,8 +7266,8 @@ Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 =
Alias candidate removed (volatile)conio_rowshift = screenlayer::$3
Alias candidate removed (volatile)conio_rowskip = screenlayer::$4
Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height
Constant right-side identified [90] vera_layer_mode_tile::$4 = < vera_layer_mode_tile::mapbase_address#0
Constant right-side identified [97] vera_layer_mode_tile::$10 = < vera_layer_mode_tile::tilebase_address#0
Constant right-side identified [108] vera_layer_mode_tile::$4 = < vera_layer_mode_tile::mapbase_address#0
Constant right-side identified [115] vera_layer_mode_tile::$10 = < vera_layer_mode_tile::tilebase_address#0
Constant right-side identified [329] uctoa::buffer#1 = ++ uctoa::buffer#0
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant vera_layer_mode_tile::config#21 = VERA_LAYER_WIDTH_128
@ -7277,9 +7284,9 @@ Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 =
Alias candidate removed (volatile)conio_rowshift = screenlayer::$3
Alias candidate removed (volatile)conio_rowskip = screenlayer::$4
Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height
Constant right-side identified [83] vera_layer_mode_tile::config#10 = vera_layer_mode_tile::config#21 | VERA_LAYER_HEIGHT_64
Constant right-side identified [89] vera_layer_mode_tile::mapbase#0 = > vera_layer_mode_tile::$4
Constant right-side identified [95] vera_layer_mode_tile::tilebase#0 = > vera_layer_mode_tile::$10
Constant right-side identified [101] vera_layer_mode_tile::config#10 = vera_layer_mode_tile::config#21 | VERA_LAYER_HEIGHT_64
Constant right-side identified [107] vera_layer_mode_tile::mapbase#0 = > vera_layer_mode_tile::$4
Constant right-side identified [113] vera_layer_mode_tile::tilebase#0 = > vera_layer_mode_tile::$10
Constant right-side identified [327] uctoa::buffer#2 = ++ uctoa::buffer#1
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant vera_layer_mode_tile::config#10 = vera_layer_mode_tile::config#21|VERA_LAYER_HEIGHT_64
@ -7299,7 +7306,7 @@ Alias candidate removed (volatile)screenlayer::vera_layer_get_width1_return#0 =
Alias candidate removed (volatile)conio_rowshift = screenlayer::$3
Alias candidate removed (volatile)conio_rowskip = screenlayer::$4
Alias candidate removed (volatile)screenlayer::vera_layer_get_height1_return#0 = screenlayer::vera_layer_get_height1_return#1 screenlayer::$5 conio_height
Constant right-side identified [91] vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#0 & VERA_LAYER_TILEBASE_MASK
Constant right-side identified [109] vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#0 & VERA_LAYER_TILEBASE_MASK
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant vera_layer_mode_tile::tilebase#1 = vera_layer_mode_tile::tilebase#0&VERA_LAYER_TILEBASE_MASK
Successful SSA optimization Pass2ConstantIdentification
@ -7315,15 +7322,15 @@ Inlining Noop Cast [281] CONIO_SCREEN_TEXT#134 = (byte*)screenlayer::$1 keeping
Successful SSA optimization Pass2NopCastInlining
Inlining Noop Cast [376] printf_number_buffer::$25 = (signed byte)printf_number_buffer::format_min_length#0 keeping printf_number_buffer::format_min_length#0
Successful SSA optimization Pass2NopCastInlining
Rewriting multiplication to use shift [18] vera_layer_set_config::$0 = vera_layer_set_config::layer#2 * SIZEOF_POINTER
Rewriting multiplication to use shift [23] vera_layer_get_config::$0 = vera_layer_get_config::layer#4 * SIZEOF_POINTER
Rewriting multiplication to use shift [32] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#4 * SIZEOF_POINTER
Rewriting multiplication to use shift [38] vera_layer_get_mapbase_offset::$0 = vera_layer_get_mapbase_offset::layer#0 * SIZEOF_WORD
Rewriting multiplication to use shift [42] vera_layer_get_mapbase::$0 = vera_layer_get_mapbase::layer#2 * SIZEOF_POINTER
Rewriting multiplication to use shift [47] vera_layer_set_tilebase::$0 = vera_layer_set_tilebase::layer#2 * SIZEOF_POINTER
Rewriting multiplication to use shift [52] vera_layer_get_tilebase::$0 = vera_layer_get_tilebase::layer#3 * SIZEOF_POINTER
Rewriting multiplication to use shift [67] vera_layer_get_color::$3 = vera_layer_get_color::layer#2 * SIZEOF_POINTER
Rewriting multiplication to use shift [78] vera_layer_get_rowskip::$0 = vera_layer_get_rowskip::layer#0 * SIZEOF_WORD
Rewriting multiplication to use shift [36] vera_layer_set_config::$0 = vera_layer_set_config::layer#2 * SIZEOF_POINTER
Rewriting multiplication to use shift [41] vera_layer_get_config::$0 = vera_layer_get_config::layer#4 * SIZEOF_POINTER
Rewriting multiplication to use shift [50] vera_layer_set_mapbase::$0 = vera_layer_set_mapbase::layer#4 * SIZEOF_POINTER
Rewriting multiplication to use shift [56] vera_layer_get_mapbase_offset::$0 = vera_layer_get_mapbase_offset::layer#0 * SIZEOF_WORD
Rewriting multiplication to use shift [60] vera_layer_get_mapbase::$0 = vera_layer_get_mapbase::layer#2 * SIZEOF_POINTER
Rewriting multiplication to use shift [65] vera_layer_set_tilebase::$0 = vera_layer_set_tilebase::layer#2 * SIZEOF_POINTER
Rewriting multiplication to use shift [70] vera_layer_get_tilebase::$0 = vera_layer_get_tilebase::layer#3 * SIZEOF_POINTER
Rewriting multiplication to use shift [85] vera_layer_get_color::$3 = vera_layer_get_color::layer#2 * SIZEOF_POINTER
Rewriting multiplication to use shift [96] vera_layer_get_rowskip::$0 = vera_layer_get_rowskip::layer#0 * SIZEOF_WORD
Rewriting multiplication to use shift [155] clrscr::$9 = conio_screen_layer * SIZEOF_WORD
Rewriting multiplication to use shift [174] gotoxy::$5 = conio_screen_layer * SIZEOF_WORD
Rewriting multiplication to use shift [189] cputc::$15 = conio_screen_layer * SIZEOF_WORD
@ -7336,6 +7343,8 @@ Rewriting multiplication to use shift [287] screenlayer::vera_layer_get_width1_$
Rewriting multiplication to use shift [303] screenlayer::vera_layer_get_height1_$2 = screenlayer::vera_layer_get_height1_layer#0 * SIZEOF_POINTER
Rewriting multiplication to use shift [307] screenlayer::vera_layer_get_height1_$3 = screenlayer::vera_layer_get_height1_$1 * SIZEOF_WORD
Successful SSA optimization Pass2MultiplyToShiftRewriting
Inlining constant with var siblings strlen::len#0
Inlining constant with var siblings strlen::str#1
Inlining constant with var siblings memcpy_in_vram::i#0
Inlining constant with var siblings vera_layer_set_config::layer#1
Inlining constant with var siblings vera_layer_set_config::layer#0
@ -7389,8 +7398,6 @@ Inlining constant with different constant siblings vera_layer_mode_tile::tilebas
Inlining constant with different constant siblings vera_layer_mode_tile::config#21
Inlining constant with different constant siblings vera_layer_mode_tile::tilebase#0
Inlining constant with different constant siblings vera_layer_mode_tile::tilebase#1
Inlining constant with var siblings strlen::len#0
Inlining constant with var siblings strlen::str#1
Inlining constant with var siblings clrscr::l#0
Inlining constant with var siblings clrscr::c#0
Inlining constant with var siblings gotoxy::x#0

View File

@ -5,6 +5,13 @@ Fixing struct type SIZE_OF struct printf_buffer_number to 12
Setting inferred volatile on symbol affected by address-of kbhit::ch
Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height
Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height
Setting inferred volatile on symbol affected by address-of: setnam::filename_len in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setnam::filename in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setlfs::device in asm { ldxdevice lda#1 ldy#0 jsr$ffba }
Setting inferred volatile on symbol affected by address-of: load::address in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: load::verify in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: load::status in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: getin::ch in asm { jsr$ffe4 stach }
Inlined call call vera_display_set_scale_double
Inlined call call vera_display_set_scale_none
Inlined call call vera_vram_address0 vera_tile_area::mapbase VERA_INC_1

View File

@ -5,6 +5,13 @@ Fixing struct type SIZE_OF struct printf_buffer_number to 12
Setting inferred volatile on symbol affected by address-of kbhit::ch
Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height
Setting inferred volatile on symbol affected by address-of conio_x16_init::$1 = call screensize &conio_screen_width &conio_screen_height
Setting inferred volatile on symbol affected by address-of: setnam::filename_len in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setnam::filename in asm { ldafilename_len ldxfilename ldyfilename+1 jsr$ffbd }
Setting inferred volatile on symbol affected by address-of: setlfs::device in asm { ldxdevice lda#1 ldy#0 jsr$ffba }
Setting inferred volatile on symbol affected by address-of: load::address in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: load::verify in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: load::status in asm { ldxaddress ldyaddress+1 ldaverify jsr$ffd5 bcserror lda#$ff error: stastatus }
Setting inferred volatile on symbol affected by address-of: getin::ch in asm { jsr$ffe4 stach }
Inlined call call vera_display_set_scale_double
Inlined call call vera_display_set_scale_none
Inlined call call vera_vram_address0 vera_tile_area::mapbase VERA_INC_1