1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-10-21 02:24:34 +00:00

Made char (without sign qualifier) unsigned as allowed by standard C. Closes #204

This commit is contained in:
jespergravgaard 2019-07-06 11:24:16 +02:00
parent 6f4a1f0555
commit b05160bfff
10 changed files with 719 additions and 534 deletions

View File

@ -49,7 +49,7 @@ public interface SymbolType {
case "signed byte":
return SBYTE;
case "char":
return SBYTE;
return BYTE;
case "unsigned char":
return BYTE;
case "signed char":

View File

@ -12,13 +12,13 @@ void main() {
void testChar() {
unsigned char u = 14;
char n = -14;
char n = 14;
signed char s = -14;
print_str("char: ");
print_byte(u);
print_char(' ');
print_sbyte(n);
print_byte(n);
print_char(' ');
print_sbyte(s);
print_ln();

View File

@ -23,4 +23,21 @@ void main() {
SCREEN[idx++] = typeid(byte()*);
// Pointer to pointer
SCREEN[idx++] = typeid(byte**);
idx = 40;
// Test C types
SCREEN[idx++] = typeid(char);
SCREEN[idx++] = typeid(unsigned char);
SCREEN[idx++] = typeid(signed char);
SCREEN[idx++] = typeid(short);
SCREEN[idx++] = typeid(unsigned short);
SCREEN[idx++] = typeid(signed short);
SCREEN[idx++] = typeid(int);
SCREEN[idx++] = typeid(unsigned int);
SCREEN[idx++] = typeid(signed int);
SCREEN[idx++] = typeid(long);
SCREEN[idx++] = typeid(unsigned long);
SCREEN[idx++] = typeid(signed long);
}

View File

@ -286,8 +286,8 @@ testShort: {
}
testChar: {
.const u = $e
.const n = -$e
.const s = -$e
.const n = $e
.label s = -$e
lda #<$400
sta print_char_cursor
lda #>$400
@ -302,10 +302,9 @@ testChar: {
lda #' '
jsr print_char
ldx #n
jsr print_sbyte
jsr print_byte
lda #' '
jsr print_char
ldx #s
jsr print_sbyte
lda #<$400
sta print_line_cursor
@ -316,24 +315,13 @@ testChar: {
str: .text "char: @"
}
// Print a signed byte as HEX
// print_sbyte(signed byte register(X) b)
print_sbyte: {
cpx #0
bmi b1
lda #' '
jsr print_char
b2:
jsr print_byte
rts
b1:
.const b = -testChar.s
lda #'-'
jsr print_char
txa
eor #$ff
clc
adc #1
tax
jmp b2
ldx #b
jsr print_byte
rts
}
// Clear the screen. Also resets current line/char cursor.
print_cls: {

View File

@ -117,24 +117,24 @@ print_word::@1: scope:[print_word] from print_word
print_word::@return: scope:[print_word] from print_word::@1
[55] return
to:@return
print_byte: scope:[print_byte] from print_sbyte::@2 print_word print_word::@1 testChar::@1
[56] (byte*) print_char_cursor#146 ← phi( print_sbyte::@2/(byte*) print_char_cursor#25 print_word/(byte*) print_char_cursor#142 print_word::@1/(byte*) print_char_cursor#25 testChar::@1/(byte*) print_char_cursor#134 )
[56] (byte) print_byte::b#4 ← phi( print_sbyte::@2/(byte) print_byte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 testChar::@1/(const byte) testChar::u#0 )
[57] (byte~) print_byte::$0 ← (byte) print_byte::b#4 >> (byte) 4
print_byte: scope:[print_byte] from print_sbyte::@2 print_word print_word::@1 testChar::@1 testChar::@3
[56] (byte*) print_char_cursor#146 ← phi( print_sbyte::@2/(byte*) print_char_cursor#25 print_word/(byte*) print_char_cursor#142 print_word::@1/(byte*) print_char_cursor#25 testChar::@1/(byte*) print_char_cursor#134 testChar::@3/(byte*) print_char_cursor#25 )
[56] (byte) print_byte::b#5 ← phi( print_sbyte::@2/(byte)(const signed byte) print_sbyte::b#0 print_word/(byte) print_byte::b#1 print_word::@1/(byte) print_byte::b#2 testChar::@1/(const byte) testChar::u#0 testChar::@3/(const byte) testChar::n#0 )
[57] (byte~) print_byte::$0 ← (byte) print_byte::b#5 >> (byte) 4
[58] (byte) print_char::ch#5 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$0)
[59] call print_char
to:print_byte::@1
print_byte::@1: scope:[print_byte] from print_byte
[60] (byte~) print_byte::$2 ← (byte) print_byte::b#4 & (byte) $f
[60] (byte~) print_byte::$2 ← (byte) print_byte::b#5 & (byte) $f
[61] (byte) print_char::ch#6 ← *((const byte[]) print_hextab#0 + (byte~) print_byte::$2)
[62] call print_char
to:print_byte::@return
print_byte::@return: scope:[print_byte] from print_byte::@1
[63] return
to:@return
print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sbyte::@3 print_sdword::@2 print_sword::@1 print_sword::@3 testChar::@2 testChar::@4 testInt::@2 testInt::@4 testLong::@2 testLong::@4 testShort::@2 testShort::@4
[64] (byte*) print_char_cursor#92 ← phi( print_byte/(byte*) print_char_cursor#146 print_byte::@1/(byte*) print_char_cursor#25 print_sbyte::@1/(byte*) print_char_cursor#25 print_sbyte::@3/(byte*) print_char_cursor#25 print_sdword::@2/(byte*) print_char_cursor#25 print_sword::@1/(byte*) print_char_cursor#25 print_sword::@3/(byte*) print_char_cursor#25 testChar::@2/(byte*) print_char_cursor#25 testChar::@4/(byte*) print_char_cursor#25 testInt::@2/(byte*) print_char_cursor#25 testInt::@4/(byte*) print_char_cursor#25 testLong::@2/(byte*) print_char_cursor#25 testLong::@4/(byte*) print_char_cursor#25 testShort::@2/(byte*) print_char_cursor#25 testShort::@4/(byte*) print_char_cursor#25 )
[64] (byte) print_char::ch#15 ← phi( print_byte/(byte) print_char::ch#5 print_byte::@1/(byte) print_char::ch#6 print_sbyte::@1/(byte) '-' print_sbyte::@3/(byte) ' ' print_sdword::@2/(byte) '-' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' testChar::@2/(byte) ' ' testChar::@4/(byte) ' ' testInt::@2/(byte) ' ' testInt::@4/(byte) ' ' testLong::@2/(byte) ' ' testLong::@4/(byte) ' ' testShort::@2/(byte) ' ' testShort::@4/(byte) ' ' )
print_char: scope:[print_char] from print_byte print_byte::@1 print_sbyte::@1 print_sdword::@2 print_sword::@1 print_sword::@3 testChar::@2 testChar::@4 testInt::@2 testInt::@4 testLong::@2 testLong::@4 testShort::@2 testShort::@4
[64] (byte*) print_char_cursor#92 ← phi( print_byte/(byte*) print_char_cursor#146 print_byte::@1/(byte*) print_char_cursor#25 print_sbyte::@1/(byte*) print_char_cursor#25 print_sdword::@2/(byte*) print_char_cursor#25 print_sword::@1/(byte*) print_char_cursor#25 print_sword::@3/(byte*) print_char_cursor#25 testChar::@2/(byte*) print_char_cursor#25 testChar::@4/(byte*) print_char_cursor#25 testInt::@2/(byte*) print_char_cursor#25 testInt::@4/(byte*) print_char_cursor#25 testLong::@2/(byte*) print_char_cursor#25 testLong::@4/(byte*) print_char_cursor#25 testShort::@2/(byte*) print_char_cursor#25 testShort::@4/(byte*) print_char_cursor#25 )
[64] (byte) print_char::ch#15 ← phi( print_byte/(byte) print_char::ch#5 print_byte::@1/(byte) print_char::ch#6 print_sbyte::@1/(byte) '-' print_sdword::@2/(byte) '-' print_sword::@1/(byte) '-' print_sword::@3/(byte) ' ' testChar::@2/(byte) ' ' testChar::@4/(byte) ' ' testInt::@2/(byte) ' ' testInt::@4/(byte) ' ' testLong::@2/(byte) ' ' testLong::@4/(byte) ' ' testShort::@2/(byte) ' ' testShort::@4/(byte) ' ' )
[65] *((byte*) print_char_cursor#92) ← (byte) print_char::ch#15
[66] (byte*) print_char_cursor#25 ← ++ (byte*) print_char_cursor#92
to:print_char::@return
@ -257,7 +257,7 @@ testChar::@2: scope:[testChar] from testChar::@1
to:testChar::@3
testChar::@3: scope:[testChar] from testChar::@2
[122] phi()
[123] call print_sbyte
[123] call print_byte
to:testChar::@4
testChar::@4: scope:[testChar] from testChar::@3
[124] phi()
@ -274,38 +274,29 @@ testChar::@6: scope:[testChar] from testChar::@5
testChar::@return: scope:[testChar] from testChar::@6
[130] return
to:@return
print_sbyte: scope:[print_sbyte] from testChar::@3 testChar::@5
[131] (signed byte) print_sbyte::b#3 ← phi( testChar::@3/(const signed byte) testChar::n#0 testChar::@5/(const signed byte) testChar::s#0 )
[132] if((signed byte) print_sbyte::b#3<(signed byte) 0) goto print_sbyte::@1
to:print_sbyte::@3
print_sbyte::@3: scope:[print_sbyte] from print_sbyte
[133] phi()
[134] call print_char
print_sbyte: scope:[print_sbyte] from testChar::@5
[131] phi()
to:print_sbyte::@1
print_sbyte::@1: scope:[print_sbyte] from print_sbyte
[132] phi()
[133] call print_char
to:print_sbyte::@2
print_sbyte::@2: scope:[print_sbyte] from print_sbyte::@3 print_sbyte::@4
[135] (signed byte) print_sbyte::b#5 ← phi( print_sbyte::@4/(signed byte) print_sbyte::b#0 print_sbyte::@3/(signed byte) print_sbyte::b#3 )
[136] (byte) print_byte::b#0 ← (byte)(signed byte) print_sbyte::b#5
[137] call print_byte
print_sbyte::@2: scope:[print_sbyte] from print_sbyte::@1
[134] phi()
[135] call print_byte
to:print_sbyte::@return
print_sbyte::@return: scope:[print_sbyte] from print_sbyte::@2
[138] return
[136] return
to:@return
print_sbyte::@1: scope:[print_sbyte] from print_sbyte
[139] phi()
[140] call print_char
to:print_sbyte::@4
print_sbyte::@4: scope:[print_sbyte] from print_sbyte::@1
[141] (signed byte) print_sbyte::b#0 ← - (signed byte) print_sbyte::b#3
to:print_sbyte::@2
print_cls: scope:[print_cls] from main
[142] phi()
[137] phi()
to:print_cls::@1
print_cls::@1: scope:[print_cls] from print_cls print_cls::@1
[143] (byte*) print_cls::sc#2 ← phi( print_cls/(byte*) 1024 print_cls::@1/(byte*) print_cls::sc#1 )
[144] *((byte*) print_cls::sc#2) ← (byte) ' '
[145] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2
[146] if((byte*) print_cls::sc#1!=(byte*) 1024+(word) $3e8) goto print_cls::@1
[138] (byte*) print_cls::sc#2 ← phi( print_cls/(byte*) 1024 print_cls::@1/(byte*) print_cls::sc#1 )
[139] *((byte*) print_cls::sc#2) ← (byte) ' '
[140] (byte*) print_cls::sc#1 ← ++ (byte*) print_cls::sc#2
[141] if((byte*) print_cls::sc#1!=(byte*) 1024+(word) $3e8) goto print_cls::@1
to:print_cls::@return
print_cls::@return: scope:[print_cls] from print_cls::@1
[147] return
[142] return
to:@return

File diff suppressed because one or more lines are too long

View File

@ -13,10 +13,9 @@
(label) print_byte::@1
(label) print_byte::@return
(byte) print_byte::b
(byte) print_byte::b#0 reg byte x 4.0
(byte) print_byte::b#1 reg byte x 4.0
(byte) print_byte::b#2 reg byte x 4.0
(byte) print_byte::b#4 reg byte x 2.5
(byte) print_byte::b#5 reg byte x 2.0
(void()) print_char((byte) print_char::ch)
(label) print_char::@return
(byte) print_char::ch
@ -28,13 +27,13 @@
(byte*) print_char_cursor#134 print_char_cursor zp ZP_WORD:10 3.583333333333333
(byte*) print_char_cursor#142 print_char_cursor zp ZP_WORD:10 6.0
(byte*) print_char_cursor#143 print_char_cursor zp ZP_WORD:10 3.0
(byte*) print_char_cursor#146 print_char_cursor zp ZP_WORD:10 3.333333333333333
(byte*) print_char_cursor#146 print_char_cursor zp ZP_WORD:10 3.9999999999999996
(byte*) print_char_cursor#153 print_char_cursor zp ZP_WORD:10 8.0
(byte*~) print_char_cursor#158 print_char_cursor zp ZP_WORD:10 4.0
(byte*~) print_char_cursor#159 print_char_cursor zp ZP_WORD:10 4.0
(byte*~) print_char_cursor#160 print_char_cursor zp ZP_WORD:10 4.0
(byte*) print_char_cursor#25 print_char_cursor zp ZP_WORD:10 0.5666666666666664
(byte*) print_char_cursor#92 print_char_cursor zp ZP_WORD:10 17.0
(byte*) print_char_cursor#25 print_char_cursor zp ZP_WORD:10 0.6000000000000004
(byte*) print_char_cursor#92 print_char_cursor zp ZP_WORD:10 16.0
(void()) print_cls()
(label) print_cls::@1
(label) print_cls::@return
@ -59,13 +58,9 @@
(void()) print_sbyte((signed byte) print_sbyte::b)
(label) print_sbyte::@1
(label) print_sbyte::@2
(label) print_sbyte::@3
(label) print_sbyte::@4
(label) print_sbyte::@return
(signed byte) print_sbyte::b
(signed byte) print_sbyte::b#0 reg byte x 4.0
(signed byte) print_sbyte::b#3 reg byte x 1.0
(signed byte) print_sbyte::b#5 reg byte x 4.0
(const signed byte) print_sbyte::b#0 b = -(const signed byte) testChar::s#0
(byte*) print_screen
(void()) print_sdword((signed dword) print_sdword::dw)
(label) print_sdword::@1
@ -110,8 +105,8 @@
(label) testChar::@5
(label) testChar::@6
(label) testChar::@return
(signed byte) testChar::n
(const signed byte) testChar::n#0 n = (signed byte) -$e
(byte) testChar::n
(const byte) testChar::n#0 n = (byte) $e
(signed byte) testChar::s
(const signed byte) testChar::s#0 s = (signed byte) -$e
(const string) testChar::str str = (string) "char: @"
@ -166,11 +161,10 @@
zp ZP_WORD:2 [ print_line_cursor#20 print_line_cursor#39 print_line_cursor#1 ]
zp ZP_DWORD:4 [ print_sdword::dw#4 print_sdword::dw#3 print_sdword::dw#0 print_dword::dw#2 print_dword::dw#0 ]
zp ZP_WORD:8 [ print_word::w#5 print_word::w#1 print_word::w#2 print_word::w#0 print_sword::w#7 print_sword::w#0 print_sword::w#10 ]
reg byte x [ print_byte::b#4 print_byte::b#0 print_byte::b#1 print_byte::b#2 ]
reg byte x [ print_byte::b#5 print_byte::b#1 print_byte::b#2 ]
reg byte a [ print_char::ch#15 print_char::ch#5 print_char::ch#6 ]
zp ZP_WORD:10 [ print_char_cursor#92 print_char_cursor#146 print_char_cursor#142 print_char_cursor#143 print_char_cursor#25 print_char_cursor#134 print_char_cursor#153 print_char_cursor#158 print_char_cursor#159 print_char_cursor#160 print_char_cursor#1 ]
zp ZP_WORD:12 [ print_str::str#5 print_str::str#7 print_str::str#0 ]
reg byte x [ print_sbyte::b#5 print_sbyte::b#0 print_sbyte::b#3 ]
zp ZP_WORD:14 [ print_cls::sc#2 print_cls::sc#1 ]
reg byte a [ print_byte::$0 ]
reg byte x [ print_byte::$2 ]

View File

@ -59,5 +59,28 @@ main: {
// Pointer to pointer
lda #TYPEID_POINTER_POINTER_BYTE
sta SCREEN+$10
// Test C types
lda #TYPEID_BYTE
sta SCREEN+$28
sta SCREEN+$29
lda #TYPEID_SIGNED_BYTE
sta SCREEN+$2a
lda #TYPEID_SIGNED_WORD
sta SCREEN+$2b
lda #TYPEID_WORD
sta SCREEN+$2c
lda #TYPEID_SIGNED_WORD
sta SCREEN+$2d
sta SCREEN+$2e
lda #TYPEID_WORD
sta SCREEN+$2f
lda #TYPEID_SIGNED_WORD
sta SCREEN+$30
lda #TYPEID_SIGNED_DWORD
sta SCREEN+$31
lda #TYPEID_DWORD
sta SCREEN+$32
lda #TYPEID_SIGNED_DWORD
sta SCREEN+$33
rts
}

View File

@ -25,7 +25,19 @@ main: scope:[main] from @1
[18] *((const byte*) main::SCREEN#0+(byte) $e) ← (const byte) TYPEID_POINTER_BOOL
[19] *((const byte*) main::SCREEN#0+(byte) $f) ← (const byte) TYPEID_POINTER_PROCEDURE
[20] *((const byte*) main::SCREEN#0+(byte) $10) ← (const byte) TYPEID_POINTER_POINTER_BYTE
[21] *((const byte*) main::SCREEN#0+(byte) $28) ← (const byte) TYPEID_BYTE
[22] *((const byte*) main::SCREEN#0+(byte) $29) ← (const byte) TYPEID_BYTE
[23] *((const byte*) main::SCREEN#0+(byte) $2a) ← (const byte) TYPEID_SIGNED_BYTE
[24] *((const byte*) main::SCREEN#0+(byte) $2b) ← (const byte) TYPEID_SIGNED_WORD
[25] *((const byte*) main::SCREEN#0+(byte) $2c) ← (const byte) TYPEID_WORD
[26] *((const byte*) main::SCREEN#0+(byte) $2d) ← (const byte) TYPEID_SIGNED_WORD
[27] *((const byte*) main::SCREEN#0+(byte) $2e) ← (const byte) TYPEID_SIGNED_WORD
[28] *((const byte*) main::SCREEN#0+(byte) $2f) ← (const byte) TYPEID_WORD
[29] *((const byte*) main::SCREEN#0+(byte) $30) ← (const byte) TYPEID_SIGNED_WORD
[30] *((const byte*) main::SCREEN#0+(byte) $31) ← (const byte) TYPEID_SIGNED_DWORD
[31] *((const byte*) main::SCREEN#0+(byte) $32) ← (const byte) TYPEID_DWORD
[32] *((const byte*) main::SCREEN#0+(byte) $33) ← (const byte) TYPEID_SIGNED_DWORD
to:main::@return
main::@return: scope:[main] from main
[21] return
[33] return
to:@return

View File

@ -39,6 +39,31 @@ main: scope:[main] from @1
(byte) main::idx#16 ← ++ (byte) main::idx#15
*((byte*) main::SCREEN#0 + (byte) main::idx#16) ← (const byte) TYPEID_POINTER_POINTER_BYTE
(byte) main::idx#17 ← ++ (byte) main::idx#16
(byte) main::idx#18 ← (number) $28
*((byte*) main::SCREEN#0 + (byte) main::idx#18) ← (const byte) TYPEID_BYTE
(byte) main::idx#19 ← ++ (byte) main::idx#18
*((byte*) main::SCREEN#0 + (byte) main::idx#19) ← (const byte) TYPEID_BYTE
(byte) main::idx#20 ← ++ (byte) main::idx#19
*((byte*) main::SCREEN#0 + (byte) main::idx#20) ← (const byte) TYPEID_SIGNED_BYTE
(byte) main::idx#21 ← ++ (byte) main::idx#20
*((byte*) main::SCREEN#0 + (byte) main::idx#21) ← (const byte) TYPEID_SIGNED_WORD
(byte) main::idx#22 ← ++ (byte) main::idx#21
*((byte*) main::SCREEN#0 + (byte) main::idx#22) ← (const byte) TYPEID_WORD
(byte) main::idx#23 ← ++ (byte) main::idx#22
*((byte*) main::SCREEN#0 + (byte) main::idx#23) ← (const byte) TYPEID_SIGNED_WORD
(byte) main::idx#24 ← ++ (byte) main::idx#23
*((byte*) main::SCREEN#0 + (byte) main::idx#24) ← (const byte) TYPEID_SIGNED_WORD
(byte) main::idx#25 ← ++ (byte) main::idx#24
*((byte*) main::SCREEN#0 + (byte) main::idx#25) ← (const byte) TYPEID_WORD
(byte) main::idx#26 ← ++ (byte) main::idx#25
*((byte*) main::SCREEN#0 + (byte) main::idx#26) ← (const byte) TYPEID_SIGNED_WORD
(byte) main::idx#27 ← ++ (byte) main::idx#26
*((byte*) main::SCREEN#0 + (byte) main::idx#27) ← (const byte) TYPEID_SIGNED_DWORD
(byte) main::idx#28 ← ++ (byte) main::idx#27
*((byte*) main::SCREEN#0 + (byte) main::idx#28) ← (const byte) TYPEID_DWORD
(byte) main::idx#29 ← ++ (byte) main::idx#28
*((byte*) main::SCREEN#0 + (byte) main::idx#29) ← (const byte) TYPEID_SIGNED_DWORD
(byte) main::idx#30 ← ++ (byte) main::idx#29
to:main::@return
main::@return: scope:[main] from main
return
@ -87,8 +112,21 @@ SYMBOL TABLE SSA
(byte) main::idx#15
(byte) main::idx#16
(byte) main::idx#17
(byte) main::idx#18
(byte) main::idx#19
(byte) main::idx#2
(byte) main::idx#20
(byte) main::idx#21
(byte) main::idx#22
(byte) main::idx#23
(byte) main::idx#24
(byte) main::idx#25
(byte) main::idx#26
(byte) main::idx#27
(byte) main::idx#28
(byte) main::idx#29
(byte) main::idx#3
(byte) main::idx#30
(byte) main::idx#4
(byte) main::idx#5
(byte) main::idx#6
@ -97,65 +135,93 @@ SYMBOL TABLE SSA
(byte) main::idx#9
Adding number conversion cast (unumber) 0 in (byte) main::idx#0 ← (number) 0
Adding number conversion cast (unumber) $28 in (byte) main::idx#18 ← (number) $28
Successful SSA optimization PassNAddNumberTypeConversions
Inlining cast (byte*) main::SCREEN#0 ← (byte*)(number) $400
Inlining cast (byte) main::idx#0 ← (unumber)(number) 0
Inlining cast (byte) main::idx#18 ← (unumber)(number) $28
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (byte*) 1024
Simplifying constant integer cast 0
Simplifying constant integer cast $28
Successful SSA optimization PassNCastSimplification
Finalized unsigned number type (byte) 0
Finalized unsigned number type (byte) $28
Successful SSA optimization PassNFinalizeNumberTypeConversions
Constant (const byte*) main::SCREEN#0 = (byte*) 1024
Constant (const byte) main::idx#0 = 0
Constant (const byte) main::idx#18 = $28
Successful SSA optimization Pass2ConstantIdentification
Simplifying expression containing zero main::SCREEN#0 in [2] *((const byte*) main::SCREEN#0 + (const byte) main::idx#0) ← (const byte) TYPEID_VOID
Successful SSA optimization PassNSimplifyExpressionWithZero
Eliminating unused variable (byte) main::idx#17 and assignment [33] (byte) main::idx#17 ← ++ (byte) main::idx#16
Eliminating unused variable (byte) main::idx#30 and assignment [57] (byte) main::idx#30 ← ++ (byte) main::idx#29
Successful SSA optimization PassNEliminateUnusedVars
Constant right-side identified [1] (byte) main::idx#1 ← ++ (const byte) main::idx#0
Constant right-side identified [34] (byte) main::idx#19 ← ++ (const byte) main::idx#18
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#1 = ++main::idx#0
Constant (const byte) main::idx#19 = ++main::idx#18
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [2] (byte) main::idx#2 ← ++ (const byte) main::idx#1
Constant right-side identified [34] (byte) main::idx#20 ← ++ (const byte) main::idx#19
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#2 = ++main::idx#1
Constant (const byte) main::idx#20 = ++main::idx#19
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [3] (byte) main::idx#3 ← ++ (const byte) main::idx#2
Constant right-side identified [34] (byte) main::idx#21 ← ++ (const byte) main::idx#20
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#3 = ++main::idx#2
Constant (const byte) main::idx#21 = ++main::idx#20
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [4] (byte) main::idx#4 ← ++ (const byte) main::idx#3
Constant right-side identified [34] (byte) main::idx#22 ← ++ (const byte) main::idx#21
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#4 = ++main::idx#3
Constant (const byte) main::idx#22 = ++main::idx#21
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [5] (byte) main::idx#5 ← ++ (const byte) main::idx#4
Constant right-side identified [34] (byte) main::idx#23 ← ++ (const byte) main::idx#22
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#5 = ++main::idx#4
Constant (const byte) main::idx#23 = ++main::idx#22
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [6] (byte) main::idx#6 ← ++ (const byte) main::idx#5
Constant right-side identified [34] (byte) main::idx#24 ← ++ (const byte) main::idx#23
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#6 = ++main::idx#5
Constant (const byte) main::idx#24 = ++main::idx#23
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [7] (byte) main::idx#7 ← ++ (const byte) main::idx#6
Constant right-side identified [34] (byte) main::idx#25 ← ++ (const byte) main::idx#24
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#7 = ++main::idx#6
Constant (const byte) main::idx#25 = ++main::idx#24
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [8] (byte) main::idx#8 ← ++ (const byte) main::idx#7
Constant right-side identified [34] (byte) main::idx#26 ← ++ (const byte) main::idx#25
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#8 = ++main::idx#7
Constant (const byte) main::idx#26 = ++main::idx#25
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [9] (byte) main::idx#9 ← ++ (const byte) main::idx#8
Constant right-side identified [34] (byte) main::idx#27 ← ++ (const byte) main::idx#26
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#9 = ++main::idx#8
Constant (const byte) main::idx#27 = ++main::idx#26
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [10] (byte) main::idx#10 ← ++ (const byte) main::idx#9
Constant right-side identified [34] (byte) main::idx#28 ← ++ (const byte) main::idx#27
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#10 = ++main::idx#9
Constant (const byte) main::idx#28 = ++main::idx#27
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [11] (byte) main::idx#11 ← ++ (const byte) main::idx#10
Constant right-side identified [34] (byte) main::idx#29 ← ++ (const byte) main::idx#28
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#11 = ++main::idx#10
Constant (const byte) main::idx#29 = ++main::idx#28
Successful SSA optimization Pass2ConstantIdentification
Constant right-side identified [12] (byte) main::idx#12 ← ++ (const byte) main::idx#11
Successful SSA optimization Pass2ConstantRValueConsolidation
@ -178,27 +244,51 @@ Successful SSA optimization Pass2ConstantRValueConsolidation
Constant (const byte) main::idx#16 = ++main::idx#15
Successful SSA optimization Pass2ConstantIdentification
Inlining constant with different constant siblings (const byte) main::idx#0
Inlining constant with different constant siblings (const byte) main::idx#18
Inlining constant with different constant siblings (const byte) main::idx#1
Inlining constant with different constant siblings (const byte) main::idx#19
Inlining constant with different constant siblings (const byte) main::idx#2
Inlining constant with different constant siblings (const byte) main::idx#20
Inlining constant with different constant siblings (const byte) main::idx#3
Inlining constant with different constant siblings (const byte) main::idx#21
Inlining constant with different constant siblings (const byte) main::idx#4
Inlining constant with different constant siblings (const byte) main::idx#22
Inlining constant with different constant siblings (const byte) main::idx#5
Inlining constant with different constant siblings (const byte) main::idx#23
Inlining constant with different constant siblings (const byte) main::idx#6
Inlining constant with different constant siblings (const byte) main::idx#24
Inlining constant with different constant siblings (const byte) main::idx#7
Inlining constant with different constant siblings (const byte) main::idx#25
Inlining constant with different constant siblings (const byte) main::idx#8
Inlining constant with different constant siblings (const byte) main::idx#26
Inlining constant with different constant siblings (const byte) main::idx#9
Inlining constant with different constant siblings (const byte) main::idx#27
Inlining constant with different constant siblings (const byte) main::idx#10
Inlining constant with different constant siblings (const byte) main::idx#28
Inlining constant with different constant siblings (const byte) main::idx#11
Inlining constant with different constant siblings (const byte) main::idx#29
Inlining constant with different constant siblings (const byte) main::idx#12
Inlining constant with different constant siblings (const byte) main::idx#13
Inlining constant with different constant siblings (const byte) main::idx#14
Inlining constant with different constant siblings (const byte) main::idx#15
Inlining constant with different constant siblings (const byte) main::idx#16
Constant inlined main::idx#16 = ++++++++++++++++++++++++++++++++(byte) 0
Constant inlined main::idx#18 = (byte) $28
Constant inlined main::idx#19 = ++(byte) $28
Constant inlined main::idx#12 = ++++++++++++++++++++++++(byte) 0
Constant inlined main::idx#13 = ++++++++++++++++++++++++++(byte) 0
Constant inlined main::idx#14 = ++++++++++++++++++++++++++++(byte) 0
Constant inlined main::idx#15 = ++++++++++++++++++++++++++++++(byte) 0
Constant inlined main::idx#20 = ++++(byte) $28
Constant inlined main::idx#21 = ++++++(byte) $28
Constant inlined main::idx#22 = ++++++++(byte) $28
Constant inlined main::idx#27 = ++++++++++++++++++(byte) $28
Constant inlined main::idx#28 = ++++++++++++++++++++(byte) $28
Constant inlined main::idx#29 = ++++++++++++++++++++++(byte) $28
Constant inlined main::idx#23 = ++++++++++(byte) $28
Constant inlined main::idx#24 = ++++++++++++(byte) $28
Constant inlined main::idx#25 = ++++++++++++++(byte) $28
Constant inlined main::idx#26 = ++++++++++++++++(byte) $28
Constant inlined main::idx#0 = (byte) 0
Constant inlined main::idx#1 = ++(byte) 0
Constant inlined main::idx#2 = ++++(byte) 0
@ -228,6 +318,18 @@ Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++++++++++
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++++++++++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++++++++++++++0)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++++++++++++++++0)
Consolidated array index constant in *(main::SCREEN#0+$28)
Consolidated array index constant in *(main::SCREEN#0+++$28)
Consolidated array index constant in *(main::SCREEN#0+++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++++$28)
Consolidated array index constant in *(main::SCREEN#0+++++++++++++++++++++++$28)
Successful SSA optimization Pass2ConstantAdditionElimination
Simplifying constant integer increment ++0
Simplifying constant integer increment ++0
@ -245,6 +347,17 @@ Simplifying constant integer increment ++$b
Simplifying constant integer increment ++$c
Simplifying constant integer increment ++$d
Simplifying constant integer increment ++$e
Simplifying constant integer increment ++$28
Simplifying constant integer increment ++$28
Simplifying constant integer increment ++$29
Simplifying constant integer increment ++$2a
Simplifying constant integer increment ++$2b
Simplifying constant integer increment ++$2c
Simplifying constant integer increment ++$2d
Simplifying constant integer increment ++$2e
Simplifying constant integer increment ++$2f
Simplifying constant integer increment ++$30
Simplifying constant integer increment ++$31
Successful SSA optimization Pass2ConstantSimplification
Simplifying constant integer increment ++1
Simplifying constant integer increment ++2
@ -261,6 +374,16 @@ Simplifying constant integer increment ++$c
Simplifying constant integer increment ++$d
Simplifying constant integer increment ++$e
Simplifying constant integer increment ++$f
Simplifying constant integer increment ++$29
Simplifying constant integer increment ++$2a
Simplifying constant integer increment ++$2b
Simplifying constant integer increment ++$2c
Simplifying constant integer increment ++$2d
Simplifying constant integer increment ++$2e
Simplifying constant integer increment ++$2f
Simplifying constant integer increment ++$30
Simplifying constant integer increment ++$31
Simplifying constant integer increment ++$32
Successful SSA optimization Pass2ConstantSimplification
Adding NOP phi() at start of @begin
Adding NOP phi() at start of @1
@ -304,9 +427,21 @@ main: scope:[main] from @1
[18] *((const byte*) main::SCREEN#0+(byte) $e) ← (const byte) TYPEID_POINTER_BOOL
[19] *((const byte*) main::SCREEN#0+(byte) $f) ← (const byte) TYPEID_POINTER_PROCEDURE
[20] *((const byte*) main::SCREEN#0+(byte) $10) ← (const byte) TYPEID_POINTER_POINTER_BYTE
[21] *((const byte*) main::SCREEN#0+(byte) $28) ← (const byte) TYPEID_BYTE
[22] *((const byte*) main::SCREEN#0+(byte) $29) ← (const byte) TYPEID_BYTE
[23] *((const byte*) main::SCREEN#0+(byte) $2a) ← (const byte) TYPEID_SIGNED_BYTE
[24] *((const byte*) main::SCREEN#0+(byte) $2b) ← (const byte) TYPEID_SIGNED_WORD
[25] *((const byte*) main::SCREEN#0+(byte) $2c) ← (const byte) TYPEID_WORD
[26] *((const byte*) main::SCREEN#0+(byte) $2d) ← (const byte) TYPEID_SIGNED_WORD
[27] *((const byte*) main::SCREEN#0+(byte) $2e) ← (const byte) TYPEID_SIGNED_WORD
[28] *((const byte*) main::SCREEN#0+(byte) $2f) ← (const byte) TYPEID_WORD
[29] *((const byte*) main::SCREEN#0+(byte) $30) ← (const byte) TYPEID_SIGNED_WORD
[30] *((const byte*) main::SCREEN#0+(byte) $31) ← (const byte) TYPEID_SIGNED_DWORD
[31] *((const byte*) main::SCREEN#0+(byte) $32) ← (const byte) TYPEID_DWORD
[32] *((const byte*) main::SCREEN#0+(byte) $33) ← (const byte) TYPEID_SIGNED_DWORD
to:main::@return
main::@return: scope:[main] from main
[21] return
[33] return
to:@return
@ -415,13 +550,50 @@ main: {
// Pointer to pointer
lda #TYPEID_POINTER_POINTER_BYTE
sta SCREEN+$10
//SEG27 [21] *((const byte*) main::SCREEN#0+(byte) $28) ← (const byte) TYPEID_BYTE -- _deref_pbuc1=vbuc2
// Test C types
lda #TYPEID_BYTE
sta SCREEN+$28
//SEG28 [22] *((const byte*) main::SCREEN#0+(byte) $29) ← (const byte) TYPEID_BYTE -- _deref_pbuc1=vbuc2
lda #TYPEID_BYTE
sta SCREEN+$29
//SEG29 [23] *((const byte*) main::SCREEN#0+(byte) $2a) ← (const byte) TYPEID_SIGNED_BYTE -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_BYTE
sta SCREEN+$2a
//SEG30 [24] *((const byte*) main::SCREEN#0+(byte) $2b) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_WORD
sta SCREEN+$2b
//SEG31 [25] *((const byte*) main::SCREEN#0+(byte) $2c) ← (const byte) TYPEID_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_WORD
sta SCREEN+$2c
//SEG32 [26] *((const byte*) main::SCREEN#0+(byte) $2d) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_WORD
sta SCREEN+$2d
//SEG33 [27] *((const byte*) main::SCREEN#0+(byte) $2e) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_WORD
sta SCREEN+$2e
//SEG34 [28] *((const byte*) main::SCREEN#0+(byte) $2f) ← (const byte) TYPEID_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_WORD
sta SCREEN+$2f
//SEG35 [29] *((const byte*) main::SCREEN#0+(byte) $30) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_WORD
sta SCREEN+$30
//SEG36 [30] *((const byte*) main::SCREEN#0+(byte) $31) ← (const byte) TYPEID_SIGNED_DWORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_DWORD
sta SCREEN+$31
//SEG37 [31] *((const byte*) main::SCREEN#0+(byte) $32) ← (const byte) TYPEID_DWORD -- _deref_pbuc1=vbuc2
lda #TYPEID_DWORD
sta SCREEN+$32
//SEG38 [32] *((const byte*) main::SCREEN#0+(byte) $33) ← (const byte) TYPEID_SIGNED_DWORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_DWORD
sta SCREEN+$33
jmp breturn
//SEG27 main::@return
//SEG39 main::@return
breturn:
//SEG28 [21] return
//SEG40 [33] return
rts
}
//SEG29 File Data
//SEG41 File Data
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [4] *((const byte*) main::SCREEN#0) ← (const byte) TYPEID_VOID [ ] ( main:2 [ ] ) always clobbers reg byte a
@ -441,13 +613,25 @@ Statement [17] *((const byte*) main::SCREEN#0+(byte) $d) ← (const byte) TYPEID
Statement [18] *((const byte*) main::SCREEN#0+(byte) $e) ← (const byte) TYPEID_POINTER_BOOL [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [19] *((const byte*) main::SCREEN#0+(byte) $f) ← (const byte) TYPEID_POINTER_PROCEDURE [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [20] *((const byte*) main::SCREEN#0+(byte) $10) ← (const byte) TYPEID_POINTER_POINTER_BYTE [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [21] *((const byte*) main::SCREEN#0+(byte) $28) ← (const byte) TYPEID_BYTE [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [22] *((const byte*) main::SCREEN#0+(byte) $29) ← (const byte) TYPEID_BYTE [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [23] *((const byte*) main::SCREEN#0+(byte) $2a) ← (const byte) TYPEID_SIGNED_BYTE [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [24] *((const byte*) main::SCREEN#0+(byte) $2b) ← (const byte) TYPEID_SIGNED_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [25] *((const byte*) main::SCREEN#0+(byte) $2c) ← (const byte) TYPEID_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [26] *((const byte*) main::SCREEN#0+(byte) $2d) ← (const byte) TYPEID_SIGNED_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [27] *((const byte*) main::SCREEN#0+(byte) $2e) ← (const byte) TYPEID_SIGNED_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [28] *((const byte*) main::SCREEN#0+(byte) $2f) ← (const byte) TYPEID_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [29] *((const byte*) main::SCREEN#0+(byte) $30) ← (const byte) TYPEID_SIGNED_WORD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [30] *((const byte*) main::SCREEN#0+(byte) $31) ← (const byte) TYPEID_SIGNED_DWORD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [31] *((const byte*) main::SCREEN#0+(byte) $32) ← (const byte) TYPEID_DWORD [ ] ( main:2 [ ] ) always clobbers reg byte a
Statement [32] *((const byte*) main::SCREEN#0+(byte) $33) ← (const byte) TYPEID_SIGNED_DWORD [ ] ( main:2 [ ] ) always clobbers reg byte a
REGISTER UPLIFT SCOPES
Uplift Scope [main]
Uplift Scope []
Uplifting [main] best 123 combination
Uplifting [] best 123 combination
Uplifting [main] best 195 combination
Uplifting [] best 195 combination
ASSEMBLER BEFORE OPTIMIZATION
//SEG0 File Comments
@ -546,19 +730,59 @@ main: {
// Pointer to pointer
lda #TYPEID_POINTER_POINTER_BYTE
sta SCREEN+$10
//SEG27 [21] *((const byte*) main::SCREEN#0+(byte) $28) ← (const byte) TYPEID_BYTE -- _deref_pbuc1=vbuc2
// Test C types
lda #TYPEID_BYTE
sta SCREEN+$28
//SEG28 [22] *((const byte*) main::SCREEN#0+(byte) $29) ← (const byte) TYPEID_BYTE -- _deref_pbuc1=vbuc2
lda #TYPEID_BYTE
sta SCREEN+$29
//SEG29 [23] *((const byte*) main::SCREEN#0+(byte) $2a) ← (const byte) TYPEID_SIGNED_BYTE -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_BYTE
sta SCREEN+$2a
//SEG30 [24] *((const byte*) main::SCREEN#0+(byte) $2b) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_WORD
sta SCREEN+$2b
//SEG31 [25] *((const byte*) main::SCREEN#0+(byte) $2c) ← (const byte) TYPEID_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_WORD
sta SCREEN+$2c
//SEG32 [26] *((const byte*) main::SCREEN#0+(byte) $2d) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_WORD
sta SCREEN+$2d
//SEG33 [27] *((const byte*) main::SCREEN#0+(byte) $2e) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_WORD
sta SCREEN+$2e
//SEG34 [28] *((const byte*) main::SCREEN#0+(byte) $2f) ← (const byte) TYPEID_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_WORD
sta SCREEN+$2f
//SEG35 [29] *((const byte*) main::SCREEN#0+(byte) $30) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_WORD
sta SCREEN+$30
//SEG36 [30] *((const byte*) main::SCREEN#0+(byte) $31) ← (const byte) TYPEID_SIGNED_DWORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_DWORD
sta SCREEN+$31
//SEG37 [31] *((const byte*) main::SCREEN#0+(byte) $32) ← (const byte) TYPEID_DWORD -- _deref_pbuc1=vbuc2
lda #TYPEID_DWORD
sta SCREEN+$32
//SEG38 [32] *((const byte*) main::SCREEN#0+(byte) $33) ← (const byte) TYPEID_SIGNED_DWORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_DWORD
sta SCREEN+$33
jmp breturn
//SEG27 main::@return
//SEG39 main::@return
breturn:
//SEG28 [21] return
//SEG40 [33] return
rts
}
//SEG29 File Data
//SEG41 File Data
ASSEMBLER OPTIMIZATIONS
Removing instruction jmp b1
Removing instruction jmp bend
Removing instruction jmp breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction lda #TYPEID_BYTE
Removing instruction lda #TYPEID_SIGNED_WORD
Succesful ASM optimization Pass5UnnecesaryLoadElimination
Removing instruction b1_from_bbegin:
Removing instruction b1:
Removing instruction bend_from_b1:
@ -602,7 +826,7 @@ FINAL SYMBOL TABLE
FINAL ASSEMBLER
Score: 108
Score: 176
//SEG0 File Comments
// Test typeid() of the different types
@ -692,9 +916,44 @@ main: {
// Pointer to pointer
lda #TYPEID_POINTER_POINTER_BYTE
sta SCREEN+$10
//SEG27 main::@return
//SEG28 [21] return
//SEG27 [21] *((const byte*) main::SCREEN#0+(byte) $28) ← (const byte) TYPEID_BYTE -- _deref_pbuc1=vbuc2
// Test C types
lda #TYPEID_BYTE
sta SCREEN+$28
//SEG28 [22] *((const byte*) main::SCREEN#0+(byte) $29) ← (const byte) TYPEID_BYTE -- _deref_pbuc1=vbuc2
sta SCREEN+$29
//SEG29 [23] *((const byte*) main::SCREEN#0+(byte) $2a) ← (const byte) TYPEID_SIGNED_BYTE -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_BYTE
sta SCREEN+$2a
//SEG30 [24] *((const byte*) main::SCREEN#0+(byte) $2b) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_WORD
sta SCREEN+$2b
//SEG31 [25] *((const byte*) main::SCREEN#0+(byte) $2c) ← (const byte) TYPEID_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_WORD
sta SCREEN+$2c
//SEG32 [26] *((const byte*) main::SCREEN#0+(byte) $2d) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_WORD
sta SCREEN+$2d
//SEG33 [27] *((const byte*) main::SCREEN#0+(byte) $2e) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2
sta SCREEN+$2e
//SEG34 [28] *((const byte*) main::SCREEN#0+(byte) $2f) ← (const byte) TYPEID_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_WORD
sta SCREEN+$2f
//SEG35 [29] *((const byte*) main::SCREEN#0+(byte) $30) ← (const byte) TYPEID_SIGNED_WORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_WORD
sta SCREEN+$30
//SEG36 [30] *((const byte*) main::SCREEN#0+(byte) $31) ← (const byte) TYPEID_SIGNED_DWORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_DWORD
sta SCREEN+$31
//SEG37 [31] *((const byte*) main::SCREEN#0+(byte) $32) ← (const byte) TYPEID_DWORD -- _deref_pbuc1=vbuc2
lda #TYPEID_DWORD
sta SCREEN+$32
//SEG38 [32] *((const byte*) main::SCREEN#0+(byte) $33) ← (const byte) TYPEID_SIGNED_DWORD -- _deref_pbuc1=vbuc2
lda #TYPEID_SIGNED_DWORD
sta SCREEN+$33
//SEG39 main::@return
//SEG40 [33] return
rts
}
//SEG29 File Data
//SEG41 File Data