1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-12-24 04:31:02 +00:00

Added MEGA65 conio.c constructor. And "Hello World" program. #507

This commit is contained in:
jespergravgaard 2020-08-24 01:21:18 +02:00
parent e52aeff84b
commit 70f0d841b5
7 changed files with 3720 additions and 0 deletions

View File

@ -16,6 +16,31 @@ const char CONIO_TEXTCOLOR_DEFAULT = LIGHT_BLUE;
// Use the shared CBM flat memory implementation
#include "conio-cbm-shared.c"
// Initializer for conio.h on MEGA65
#pragma constructor_for(conio_mega65_init, cputc)
// Enable 2K Color ROM
void conio_mega65_init() {
// Disable BASIC/KERNAL interrupts
asm {
sei
}
// Map memory to BANK 0 : 0x00XXXX - giving access to I/O
asm {
lda #0
tax
tay
taz
map
eom
}
// Enable the VIC 4
*IO_KEY = 0x47;
*IO_KEY = 0x53;
// Enable 2K Color RAM
*IO_BANK |= CRAM2K;
}
// Return true if there's a key waiting, return false if not
unsigned char kbhit (void) {
// CIA#1 Port A: keyboard matrix columns and joystick #2

View File

@ -212,6 +212,11 @@ public class TestPrograms {
compileAndCompare("examples/mega65/32bit-addressing-mega65.c");
}
@Test
public void testMega65HelloWorld() throws IOException, URISyntaxException {
compileAndCompare("examples/mega65/helloworld-mega65.c");
}
@Test
public void testMega65Hello() throws IOException, URISyntaxException {
compileAndCompare("examples/mega65/hello-mega65.c");

View File

@ -0,0 +1,7 @@
// Hello World for MEGA 65 - using stdio.h and conio.h
#pragma target(mega65)
#include <stdio.h>
void main() {
printf("hello world!");
}

View File

@ -0,0 +1,303 @@
// Hello World for MEGA 65 - using stdio.h and conio.h
// Functions for performing input and output.
.cpu _45gs02
.file [name="helloworld-mega65.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$2001]
.segmentdef Code [start=$2017]
.segmentdef Data [startAfter="Code"]
.segment Basic
.byte $0a, $20, $0a, $00, $fe, $02, $20, $30, $00 // 10 BANK 0
.byte $15, $20, $14, $00, $9e, $20 // 20 SYS
.text toIntString(__start) // NNNN
.byte $00, $00, $00 //
// Map 2nd KB of colour RAM $DC00-$DFFF (hiding CIA's)
.const CRAM2K = 1
.const LIGHT_BLUE = $e
// I/O Personality selection
.label IO_KEY = $d02f
// C65 Banking Register
.label IO_BANK = $d030
// Color Ram
.label COLORRAM = $d800
// Default address of screen character matrix
.label DEFAULT_SCREEN = $800
// The number of bytes on the screen
// The current cursor x-position
.label conio_cursor_x = 6
// The current cursor y-position
.label conio_cursor_y = 7
// The current text cursor line start
.label conio_line_text = 8
// The current color cursor line start
.label conio_line_color = $a
.segment Code
__start: {
// conio_cursor_x = 0
lda #0
sta.z conio_cursor_x
// conio_cursor_y = 0
sta.z conio_cursor_y
// conio_line_text = CONIO_SCREEN_TEXT
lda #<DEFAULT_SCREEN
sta.z conio_line_text
lda #>DEFAULT_SCREEN
sta.z conio_line_text+1
// conio_line_color = CONIO_SCREEN_COLORS
lda #<COLORRAM
sta.z conio_line_color
lda #>COLORRAM
sta.z conio_line_color+1
// #pragma constructor_for(conio_mega65_init, cputc)
//#pragma constructor
jsr conio_mega65_init
jsr main
rts
}
// Enable 2K Color ROM
conio_mega65_init: {
// asm
// Disable BASIC/KERNAL interrupts
sei
// Map memory to BANK 0 : 0x00XXXX - giving access to I/O
lda #0
tax
tay
taz
map
eom
// *IO_KEY = 0x47
// Enable the VIC 4
lda #$47
sta IO_KEY
// *IO_KEY = 0x53
lda #$53
sta IO_KEY
// *IO_BANK |= CRAM2K
// Enable 2K Color RAM
lda #CRAM2K
ora IO_BANK
sta IO_BANK
// }
rts
}
main: {
// printf("hello world!")
jsr cputs
// }
rts
.segment Data
s: .text "hello world!"
.byte 0
}
.segment Code
// Output a NUL-terminated string at the current cursor position
// cputs(byte* zp(2) s)
cputs: {
.label s = 2
lda #<main.s
sta.z s
lda #>main.s
sta.z s+1
__b1:
// while(c=*s++)
ldy #0
lda (s),y
inw.z s
cmp #0
bne __b2
// }
rts
__b2:
// cputc(c)
jsr cputc
jmp __b1
}
// Output one character at the current cursor position
// Moves the cursor forward. Scrolls the entire screen if needed
// cputc(byte register(A) c)
cputc: {
// if(c=='\n')
cmp #'\n'
beq __b1
// conio_line_text[conio_cursor_x] = c
ldy.z conio_cursor_x
sta (conio_line_text),y
// conio_line_color[conio_cursor_x] = conio_textcolor
lda #LIGHT_BLUE
sta (conio_line_color),y
// if(++conio_cursor_x==CONIO_WIDTH)
inc.z conio_cursor_x
lda #$50
cmp.z conio_cursor_x
bne __breturn
// cputln()
jsr cputln
__breturn:
// }
rts
__b1:
// cputln()
jsr cputln
rts
}
// Print a newline
cputln: {
// conio_line_text += CONIO_WIDTH
lda #$50
clc
adc.z conio_line_text
sta.z conio_line_text
bcc !+
inc.z conio_line_text+1
!:
// conio_line_color += CONIO_WIDTH
lda #$50
clc
adc.z conio_line_color
sta.z conio_line_color
bcc !+
inc.z conio_line_color+1
!:
// conio_cursor_x = 0
lda #0
sta.z conio_cursor_x
// conio_cursor_y++;
inc.z conio_cursor_y
// cscroll()
jsr cscroll
// }
rts
}
// Scroll the entire screen if the cursor is beyond the last line
cscroll: {
// if(conio_cursor_y==CONIO_HEIGHT)
lda #$19
cmp.z conio_cursor_y
bne __breturn
// memcpy(CONIO_SCREEN_TEXT, CONIO_SCREEN_TEXT+CONIO_WIDTH, CONIO_BYTES-CONIO_WIDTH)
lda #<DEFAULT_SCREEN
sta.z memcpy.destination
lda #>DEFAULT_SCREEN
sta.z memcpy.destination+1
lda #<DEFAULT_SCREEN+$50
sta.z memcpy.source
lda #>DEFAULT_SCREEN+$50
sta.z memcpy.source+1
jsr memcpy
// memcpy(CONIO_SCREEN_COLORS, CONIO_SCREEN_COLORS+CONIO_WIDTH, CONIO_BYTES-CONIO_WIDTH)
lda #<COLORRAM
sta.z memcpy.destination
lda #>COLORRAM
sta.z memcpy.destination+1
lda #<COLORRAM+$50
sta.z memcpy.source
lda #>COLORRAM+$50
sta.z memcpy.source+1
jsr memcpy
// memset(CONIO_SCREEN_TEXT+CONIO_BYTES-CONIO_WIDTH, ' ', CONIO_WIDTH)
ldz #' '
lda #<DEFAULT_SCREEN+$19*$50-$50
sta.z memset.str
lda #>DEFAULT_SCREEN+$19*$50-$50
sta.z memset.str+1
jsr memset
// memset(CONIO_SCREEN_COLORS+CONIO_BYTES-CONIO_WIDTH, conio_textcolor, CONIO_WIDTH)
ldz #LIGHT_BLUE
lda #<COLORRAM+$19*$50-$50
sta.z memset.str
lda #>COLORRAM+$19*$50-$50
sta.z memset.str+1
jsr memset
// conio_line_text -= CONIO_WIDTH
sec
lda.z conio_line_text
sbc #$50
sta.z conio_line_text
lda.z conio_line_text+1
sbc #0
sta.z conio_line_text+1
// conio_line_color -= CONIO_WIDTH
sec
lda.z conio_line_color
sbc #$50
sta.z conio_line_color
lda.z conio_line_color+1
sbc #0
sta.z conio_line_color+1
// conio_cursor_y--;
dec.z conio_cursor_y
__breturn:
// }
rts
}
// Copy block of memory (forwards)
// Copies the values of num bytes from the location pointed to by source directly to the memory block pointed to by destination.
// memcpy(void* zp($e) destination, void* zp(4) source)
memcpy: {
.label src_end = $c
.label dst = $e
.label src = 4
.label source = 4
.label destination = $e
// src_end = (char*)source+num
lda.z source
clc
adc #<$19*$50-$50
sta.z src_end
lda.z source+1
adc #>$19*$50-$50
sta.z src_end+1
__b1:
// while(src!=src_end)
lda.z src+1
cmp.z src_end+1
bne __b2
lda.z src
cmp.z src_end
bne __b2
// }
rts
__b2:
// *dst++ = *src++
ldy #0
lda (src),y
sta (dst),y
// *dst++ = *src++;
inw.z dst
inw.z src
jmp __b1
}
// Copies the character c (an unsigned char) to the first num characters of the object pointed to by the argument str.
// memset(void* zp(4) str, byte register(Z) c)
memset: {
.label end = $e
.label dst = 4
.label str = 4
// end = (char*)str + num
lda #$50
clc
adc.z str
sta.z end
lda #0
adc.z str+1
sta.z end+1
__b2:
// for(char* dst = str; dst!=end; dst++)
lda.z dst+1
cmp.z end+1
bne __b3
lda.z dst
cmp.z end
bne __b3
// }
rts
__b3:
// *dst = c
tza
ldy #0
sta (dst),y
// for(char* dst = str; dst!=end; dst++)
inw.z dst
jmp __b2
}

View File

@ -0,0 +1,165 @@
(void()) __start()
__start: scope:[__start] from
[0] phi()
to:__start::__init1
__start::__init1: scope:[__start] from __start
[1] (byte) conio_cursor_x ← (byte) 0
[2] (byte) conio_cursor_y ← (byte) 0
[3] (byte*) conio_line_text ← (const nomodify byte*) DEFAULT_SCREEN
[4] (byte*) conio_line_color ← (const nomodify byte*) COLORRAM
[5] call conio_mega65_init
to:__start::@1
__start::@1: scope:[__start] from __start::__init1
[6] phi()
[7] call main
to:__start::@return
__start::@return: scope:[__start] from __start::@1
[8] return
to:@return
(void()) conio_mega65_init()
conio_mega65_init: scope:[conio_mega65_init] from __start::__init1
asm { sei }
asm { lda#0 tax tay taz map eom }
[11] *((const nomodify to_volatile byte*) IO_KEY) ← (byte) $47
[12] *((const nomodify to_volatile byte*) IO_KEY) ← (byte) $53
[13] *((const nomodify to_volatile byte*) IO_BANK) ← *((const nomodify to_volatile byte*) IO_BANK) | (const nomodify byte) CRAM2K
to:conio_mega65_init::@return
conio_mega65_init::@return: scope:[conio_mega65_init] from conio_mega65_init
[14] return
to:@return
(void()) main()
main: scope:[main] from __start::@1
[15] phi()
[16] call cputs
to:main::@return
main::@return: scope:[main] from main
[17] return
to:@return
(void()) cputs((to_nomodify byte*) cputs::s)
cputs: scope:[cputs] from main
[18] phi()
to:cputs::@1
cputs::@1: scope:[cputs] from cputs cputs::@2
[19] (to_nomodify byte*) cputs::s#2 ← phi( cputs/(const byte*) main::s cputs::@2/(to_nomodify byte*) cputs::s#0 )
[20] (byte) cputs::c#1 ← *((to_nomodify byte*) cputs::s#2)
[21] (to_nomodify byte*) cputs::s#0 ← ++ (to_nomodify byte*) cputs::s#2
[22] if((byte) 0!=(byte) cputs::c#1) goto cputs::@2
to:cputs::@return
cputs::@return: scope:[cputs] from cputs::@1
[23] return
to:@return
cputs::@2: scope:[cputs] from cputs::@1
[24] (byte) cputc::c#0 ← (byte) cputs::c#1
[25] call cputc
to:cputs::@1
(void()) cputc((byte) cputc::c)
cputc: scope:[cputc] from cputs::@2
[26] if((byte) cputc::c#0==(byte) '
') goto cputc::@1
to:cputc::@2
cputc::@2: scope:[cputc] from cputc
[27] *((byte*) conio_line_text + (byte) conio_cursor_x) ← (byte) cputc::c#0
[28] *((byte*) conio_line_color + (byte) conio_cursor_x) ← (const nomodify byte) LIGHT_BLUE
[29] (byte) conio_cursor_x ← ++ (byte) conio_cursor_x
[30] if((byte) conio_cursor_x!=(byte) $50) goto cputc::@return
to:cputc::@3
cputc::@3: scope:[cputc] from cputc::@2
[31] phi()
[32] call cputln
to:cputc::@return
cputc::@return: scope:[cputc] from cputc::@1 cputc::@2 cputc::@3
[33] return
to:@return
cputc::@1: scope:[cputc] from cputc
[34] phi()
[35] call cputln
to:cputc::@return
(void()) cputln()
cputln: scope:[cputln] from cputc::@1 cputc::@3
[36] (byte*) conio_line_text ← (byte*) conio_line_text + (byte) $50
[37] (byte*) conio_line_color ← (byte*) conio_line_color + (byte) $50
[38] (byte) conio_cursor_x ← (byte) 0
[39] (byte) conio_cursor_y ← ++ (byte) conio_cursor_y
[40] call cscroll
to:cputln::@return
cputln::@return: scope:[cputln] from cputln
[41] return
to:@return
(void()) cscroll()
cscroll: scope:[cscroll] from cputln
[42] if((byte) conio_cursor_y!=(byte) $19) goto cscroll::@return
to:cscroll::@1
cscroll::@1: scope:[cscroll] from cscroll
[43] phi()
[44] call memcpy
to:cscroll::@2
cscroll::@2: scope:[cscroll] from cscroll::@1
[45] phi()
[46] call memcpy
to:cscroll::@3
cscroll::@3: scope:[cscroll] from cscroll::@2
[47] phi()
[48] call memset
to:cscroll::@4
cscroll::@4: scope:[cscroll] from cscroll::@3
[49] phi()
[50] call memset
to:cscroll::@5
cscroll::@5: scope:[cscroll] from cscroll::@4
[51] (byte*) conio_line_text ← (byte*) conio_line_text - (byte) $50
[52] (byte*) conio_line_color ← (byte*) conio_line_color - (byte) $50
[53] (byte) conio_cursor_y ← -- (byte) conio_cursor_y
to:cscroll::@return
cscroll::@return: scope:[cscroll] from cscroll cscroll::@5
[54] return
to:@return
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
memcpy: scope:[memcpy] from cscroll::@1 cscroll::@2
[55] (void*) memcpy::destination#2 ← phi( cscroll::@1/(void*)(const nomodify byte*) DEFAULT_SCREEN cscroll::@2/(void*)(const nomodify byte*) COLORRAM )
[55] (void*) memcpy::source#2 ← phi( cscroll::@1/(void*)(const nomodify byte*) DEFAULT_SCREEN+(byte) $50 cscroll::@2/(void*)(const nomodify byte*) COLORRAM+(byte) $50 )
[56] (byte*) memcpy::src_end#0 ← (byte*)(void*) memcpy::source#2 + (word)(number) $19*(number) $50-(number) $50
[57] (byte*) memcpy::src#4 ← (byte*)(void*) memcpy::source#2
[58] (byte*) memcpy::dst#4 ← (byte*)(void*) memcpy::destination#2
to:memcpy::@1
memcpy::@1: scope:[memcpy] from memcpy memcpy::@2
[59] (byte*) memcpy::dst#2 ← phi( memcpy/(byte*) memcpy::dst#4 memcpy::@2/(byte*) memcpy::dst#1 )
[59] (byte*) memcpy::src#2 ← phi( memcpy/(byte*) memcpy::src#4 memcpy::@2/(byte*) memcpy::src#1 )
[60] if((byte*) memcpy::src#2!=(byte*) memcpy::src_end#0) goto memcpy::@2
to:memcpy::@return
memcpy::@return: scope:[memcpy] from memcpy::@1
[61] return
to:@return
memcpy::@2: scope:[memcpy] from memcpy::@1
[62] *((byte*) memcpy::dst#2) ← *((byte*) memcpy::src#2)
[63] (byte*) memcpy::dst#1 ← ++ (byte*) memcpy::dst#2
[64] (byte*) memcpy::src#1 ← ++ (byte*) memcpy::src#2
to:memcpy::@1
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
memset: scope:[memset] from cscroll::@3 cscroll::@4
[65] (byte) memset::c#4 ← phi( cscroll::@3/(byte) ' ' cscroll::@4/(const nomodify byte) LIGHT_BLUE )
[65] (void*) memset::str#3 ← phi( cscroll::@3/(void*)(const nomodify byte*) DEFAULT_SCREEN+(word)(number) $19*(number) $50-(byte) $50 cscroll::@4/(void*)(const nomodify byte*) COLORRAM+(word)(number) $19*(number) $50-(byte) $50 )
to:memset::@1
memset::@1: scope:[memset] from memset
[66] (byte*) memset::end#0 ← (byte*)(void*) memset::str#3 + (byte) $50
[67] (byte*) memset::dst#4 ← (byte*)(void*) memset::str#3
to:memset::@2
memset::@2: scope:[memset] from memset::@1 memset::@3
[68] (byte*) memset::dst#2 ← phi( memset::@1/(byte*) memset::dst#4 memset::@3/(byte*) memset::dst#1 )
[69] if((byte*) memset::dst#2!=(byte*) memset::end#0) goto memset::@3
to:memset::@return
memset::@return: scope:[memset] from memset::@2
[70] return
to:@return
memset::@3: scope:[memset] from memset::@2
[71] *((byte*) memset::dst#2) ← (byte) memset::c#4
[72] (byte*) memset::dst#1 ← ++ (byte*) memset::dst#2
to:memset::@2

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,191 @@
(const nomodify byte*) COLORRAM = (byte*) 55296
(const nomodify byte) CRAM2K = (byte) 1
(const nomodify byte*) DEFAULT_SCREEN = (byte*) 2048
(const nomodify to_volatile byte*) IO_BANK = (byte*) 53296
(const nomodify to_volatile byte*) IO_KEY = (byte*) 53295
(const nomodify byte) LIGHT_BLUE = (byte) $e
(byte) MOS6526_CIA::INTERRUPT
(byte) MOS6526_CIA::PORT_A
(byte) MOS6526_CIA::PORT_A_DDR
(byte) MOS6526_CIA::PORT_B
(byte) MOS6526_CIA::PORT_B_DDR
(byte) MOS6526_CIA::SERIAL_DATA
(word) MOS6526_CIA::TIMER_A
(byte) MOS6526_CIA::TIMER_A_CONTROL
(word) MOS6526_CIA::TIMER_B
(byte) MOS6526_CIA::TIMER_B_CONTROL
(byte) MOS6526_CIA::TOD_10THS
(byte) MOS6526_CIA::TOD_HOURS
(byte) MOS6526_CIA::TOD_MIN
(byte) MOS6526_CIA::TOD_SEC
(byte) MOS6569_VICII::BG_COLOR
(byte) MOS6569_VICII::BG_COLOR1
(byte) MOS6569_VICII::BG_COLOR2
(byte) MOS6569_VICII::BG_COLOR3
(byte) MOS6569_VICII::BORDER_COLOR
(byte) MOS6569_VICII::CONTROL1
(byte) MOS6569_VICII::CONTROL2
(byte) MOS6569_VICII::IRQ_ENABLE
(byte) MOS6569_VICII::IRQ_STATUS
(byte) MOS6569_VICII::LIGHTPEN_X
(byte) MOS6569_VICII::LIGHTPEN_Y
(byte) MOS6569_VICII::MEMORY
(byte) MOS6569_VICII::RASTER
(byte) MOS6569_VICII::SPRITE0_COLOR
(byte) MOS6569_VICII::SPRITE0_X
(byte) MOS6569_VICII::SPRITE0_Y
(byte) MOS6569_VICII::SPRITE1_COLOR
(byte) MOS6569_VICII::SPRITE1_X
(byte) MOS6569_VICII::SPRITE1_Y
(byte) MOS6569_VICII::SPRITE2_COLOR
(byte) MOS6569_VICII::SPRITE2_X
(byte) MOS6569_VICII::SPRITE2_Y
(byte) MOS6569_VICII::SPRITE3_COLOR
(byte) MOS6569_VICII::SPRITE3_X
(byte) MOS6569_VICII::SPRITE3_Y
(byte) MOS6569_VICII::SPRITE4_COLOR
(byte) MOS6569_VICII::SPRITE4_X
(byte) MOS6569_VICII::SPRITE4_Y
(byte) MOS6569_VICII::SPRITE5_COLOR
(byte) MOS6569_VICII::SPRITE5_X
(byte) MOS6569_VICII::SPRITE5_Y
(byte) MOS6569_VICII::SPRITE6_COLOR
(byte) MOS6569_VICII::SPRITE6_X
(byte) MOS6569_VICII::SPRITE6_Y
(byte) MOS6569_VICII::SPRITE7_COLOR
(byte) MOS6569_VICII::SPRITE7_X
(byte) MOS6569_VICII::SPRITE7_Y
(byte) MOS6569_VICII::SPRITES_BG_COLLISION
(byte) MOS6569_VICII::SPRITES_COLLISION
(byte) MOS6569_VICII::SPRITES_ENABLE
(byte) MOS6569_VICII::SPRITES_EXPAND_X
(byte) MOS6569_VICII::SPRITES_EXPAND_Y
(byte) MOS6569_VICII::SPRITES_MC
(byte) MOS6569_VICII::SPRITES_MCOLOR1
(byte) MOS6569_VICII::SPRITES_MCOLOR2
(byte) MOS6569_VICII::SPRITES_PRIORITY
(byte) MOS6569_VICII::SPRITES_XMSB
(byte) MOS6581_SID::CH1_ATTACK_DECAY
(byte) MOS6581_SID::CH1_CONTROL
(word) MOS6581_SID::CH1_FREQ
(word) MOS6581_SID::CH1_PULSE_WIDTH
(byte) MOS6581_SID::CH1_SUSTAIN_RELEASE
(byte) MOS6581_SID::CH2_ATTACK_DECAY
(byte) MOS6581_SID::CH2_CONTROL
(word) MOS6581_SID::CH2_FREQ
(word) MOS6581_SID::CH2_PULSE_WIDTH
(byte) MOS6581_SID::CH2_SUSTAIN_RELEASE
(byte) MOS6581_SID::CH3_ATTACK_DECAY
(byte) MOS6581_SID::CH3_CONTROL
(byte) MOS6581_SID::CH3_ENV
(word) MOS6581_SID::CH3_FREQ
(byte) MOS6581_SID::CH3_OSC
(word) MOS6581_SID::CH3_PULSE_WIDTH
(byte) MOS6581_SID::CH3_SUSTAIN_RELEASE
(byte) MOS6581_SID::FILTER_CUTOFF_HIGH
(byte) MOS6581_SID::FILTER_CUTOFF_LOW
(byte) MOS6581_SID::FILTER_SETUP
(byte) MOS6581_SID::POT_X
(byte) MOS6581_SID::POT_Y
(byte) MOS6581_SID::VOLUME_FILTER_MODE
(const byte) RADIX::BINARY = (number) 2
(const byte) RADIX::DECIMAL = (number) $a
(const byte) RADIX::HEXADECIMAL = (number) $10
(const byte) RADIX::OCTAL = (number) 8
(void()) __start()
(label) __start::@1
(label) __start::@return
(label) __start::__init1
(byte) conio_cursor_x loadstore zp[1]:6 5769.538461538461
(byte) conio_cursor_y loadstore zp[1]:7 76190.64285714286
(byte*) conio_line_color loadstore zp[2]:10 55250.175
(byte*) conio_line_text loadstore zp[2]:8 53902.60975609756
(void()) conio_mega65_init()
(label) conio_mega65_init::@return
(void()) cputc((byte) cputc::c)
(label) cputc::@1
(label) cputc::@2
(label) cputc::@3
(label) cputc::@return
(byte) cputc::c
(byte) cputc::c#0 reg byte a 10501.5
(void()) cputln()
(label) cputln::@return
(void()) cputs((to_nomodify byte*) cputs::s)
(label) cputs::@1
(label) cputs::@2
(label) cputs::@return
(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]:2 500.5
(to_nomodify byte*) cputs::s#2 s zp[2]:2 1501.5
(void()) cscroll()
(label) cscroll::@1
(label) cscroll::@2
(label) cscroll::@3
(label) cscroll::@4
(label) cscroll::@5
(label) cscroll::@return
(void()) main()
(label) main::@return
(const byte*) main::s[(byte) $d] = (byte*) "hello world!"
(void*()) memcpy((void*) memcpy::destination , (void*) memcpy::source , (word) memcpy::num)
(label) memcpy::@1
(label) memcpy::@2
(label) memcpy::@return
(void*) memcpy::destination
(void*) memcpy::destination#2 destination zp[2]:14
(byte*) memcpy::dst
(byte*) memcpy::dst#1 dst zp[2]:14 1.000000001E9
(byte*) memcpy::dst#2 dst zp[2]:14 1.0033333346666667E9
(byte*) memcpy::dst#4 dst zp[2]:14 2.0000002E7
(word) memcpy::num
(void*) memcpy::return
(void*) memcpy::source
(void*) memcpy::source#2 source zp[2]:4
(byte*) memcpy::src
(byte*) memcpy::src#1 src zp[2]:4 2.000000002E9
(byte*) memcpy::src#2 src zp[2]:4 1.00250000125E9
(byte*) memcpy::src#4 src zp[2]:4 1.0000001E7
(byte*) memcpy::src_end
(byte*) memcpy::src_end#0 src_end zp[2]:12 1.2625000025E8
(void*()) memset((void*) memset::str , (byte) memset::c , (word) memset::num)
(label) memset::@1
(label) memset::@2
(label) memset::@3
(label) memset::@return
(byte) memset::c
(byte) memset::c#4 reg byte z 1.42857143E8
(byte*) memset::dst
(byte*) memset::dst#1 dst zp[2]:4 2.000000002E9
(byte*) memset::dst#2 dst zp[2]:4 1.3366666683333335E9
(byte*) memset::dst#4 dst zp[2]:4 2.0000002E7
(byte*) memset::end
(byte*) memset::end#0 end zp[2]:14 1.683333336666667E8
(word) memset::num
(void*) memset::return
(void*) memset::str
(void*) memset::str#3 str zp[2]:4
(const byte*) printf_buffer_number::digits[(number) $b] = { fill( $b, 0) }
(byte) printf_buffer_number::sign
(byte) printf_format_number::justify_left
(byte) printf_format_number::min_length
(byte) printf_format_number::radix
(byte) printf_format_number::sign_always
(byte) printf_format_number::upper_case
(byte) printf_format_number::zero_padding
(byte) printf_format_string::justify_left
(byte) printf_format_string::min_length
zp[2]:2 [ cputs::s#2 cputs::s#0 ]
zp[2]:4 [ memset::str#3 memset::dst#2 memset::dst#4 memset::dst#1 memcpy::source#2 memcpy::src#2 memcpy::src#4 memcpy::src#1 ]
reg byte z [ memset::c#4 ]
zp[1]:6 [ conio_cursor_x ]
zp[1]:7 [ conio_cursor_y ]
zp[2]:8 [ conio_line_text ]
zp[2]:10 [ conio_line_color ]
reg byte a [ cputs::c#1 ]
reg byte a [ cputc::c#0 ]
zp[2]:12 [ memcpy::src_end#0 ]
zp[2]:14 [ memset::end#0 memcpy::destination#2 memcpy::dst#2 memcpy::dst#4 memcpy::dst#1 ]