1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-20 02:32:36 +00:00
kickc/src/test/ref/roll-sprite-msb.cfg
2019-09-29 20:57:28 +02:00

51 lines
2.2 KiB
INI

@begin: scope:[] from
[0] phi()
to:@1
@1: scope:[] from @begin
[1] phi()
[2] call main
to:@end
@end: scope:[] from @1
[3] phi()
(void()) main()
main: scope:[main] from @1
[4] phi()
to:main::@1
main::@1: scope:[main] from main main::@2
[5] (word) main::xpos#2 ← phi( main/(byte) $c8 main::@2/(word) main::xpos#1 )
[5] (byte) main::s#2 ← phi( main/(byte) 0 main::@2/(byte) main::s#1 )
[6] (byte) position_sprite::spriteno#0 ← (byte) main::s#2
[7] (word) position_sprite::x#0 ← (word) main::xpos#2
[8] call position_sprite
to:main::@2
main::@2: scope:[main] from main::@1
[9] (word) main::xpos#1 ← (word) main::xpos#2 + (byte) $a
[10] (byte) main::s#1 ← ++ (byte) main::s#2
[11] if((byte) main::s#1!=(byte) 8) goto main::@1
to:main::@return
main::@return: scope:[main] from main::@2
[12] return
to:@return
(void()) position_sprite((byte) position_sprite::spriteno , (word) position_sprite::x , (byte) position_sprite::y)
position_sprite: scope:[position_sprite] from main::@1
[13] (byte~) position_sprite::$1 ← (byte) position_sprite::spriteno#0 << (byte) 1
[14] *((const byte*) SPRITES_YPOS + (byte~) position_sprite::$1) ← (const byte) position_sprite::y#0
[15] (byte~) position_sprite::$2 ← < (word) position_sprite::x#0
[16] *((const byte*) SPRITES_XPOS + (byte~) position_sprite::$1) ← (byte~) position_sprite::$2
[17] if((word) position_sprite::x#0>(byte) $ff) goto position_sprite::@1
to:position_sprite::@2
position_sprite::@2: scope:[position_sprite] from position_sprite
[18] (byte~) position_sprite::$4 ← (byte) 1 << (byte) position_sprite::spriteno#0
[19] (byte~) position_sprite::$5 ← (byte~) position_sprite::$4 ^ (byte) $ff
[20] *((const byte*) SPRITES_XMSB) ← *((const byte*) SPRITES_XMSB) & (byte~) position_sprite::$5
to:position_sprite::@return
position_sprite::@return: scope:[position_sprite] from position_sprite::@1 position_sprite::@2
[21] return
to:@return
position_sprite::@1: scope:[position_sprite] from position_sprite
[22] (byte~) position_sprite::$6 ← (byte) 1 << (byte) position_sprite::spriteno#0
[23] *((const byte*) SPRITES_XMSB) ← *((const byte*) SPRITES_XMSB) | (byte~) position_sprite::$6
to:position_sprite::@return