Advertisement
Guest User

Untitled

a guest
Jan 13th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Zero extending: t39: i16,ch = load<LD2[FixedStack0+1](align=1)> t36, t38, undef:i24
  2.     SEGMENT CODE
  3.     .assume adl = 1
  4.     .file   "main.c"
  5.     XDEF    _main
  6. _main:
  7.     ld  hl, _asm_ClrLCD
  8.     push    hl
  9.     call    __OS
  10.     pop hl
  11.     ld  hl, _asm_HomeUp
  12.     push    hl
  13.     call    __OS
  14.     pop hl
  15.     ld  hl, _asm_DrawStatusBar
  16.     push    hl
  17.     call    __OS
  18.     pop hl
  19.     ld  hl, 5
  20.     push    hl
  21.     ld  hl, 2
  22.     push    hl
  23.     call    _os_SetCursorPos
  24.     ld  hl, 6
  25.     add hl, sp
  26.     ld  sp, hl
  27.     ld  hl, L_.str
  28.     push    hl
  29.     call    _os_PutStrFull
  30.     pop hl
  31.     ld  hl, 5
  32.     push    hl
  33.     ld  hl, 3
  34.     push    hl
  35.     call    _os_SetCursorPos
  36.     ld  hl, 6
  37.     add hl, sp
  38.     ld  sp, hl
  39.     ld  hl, L_.str.1
  40.     push    hl
  41.     call    _os_PutStrFull
  42.     pop hl
  43. BB0_1:
  44.     call    _os_GetCSC
  45.     cp  a, 0
  46.     jp  z, BB0_1
  47.     call    _Init
  48.     jp  _gfx_End
  49.  
  50.     XDEF    _printText
  51. _printText:
  52.     push    ix
  53.     ld  ix, 0
  54.     add ix, sp
  55.     ld  e, (ix + 9)
  56.     push    de
  57.     ld  l, (ix + 12)
  58.     push    hl
  59.     call    _os_SetCursorPos
  60.     ld  sp, ix
  61.     pop ix
  62.     jp  _os_PutStrFull
  63.  
  64.     XDEF    _Canon
  65. _Canon:
  66.     ld.sis  hl, 257
  67.     ld.sis  (_Tab+6050), hl
  68.     ld.sis  (_Tab+6170), hl
  69.     ld  a, 1
  70.     ld  (_Tab+7369), a
  71.     ld  (_Tab+7373), a
  72.     ld  (_Tab+7488), a
  73.     ld  (_Tab+7494), a
  74.     ld  (_Tab+7608), a
  75.     ld  (_Tab+7614), a
  76.     ld  (_Tab+7731), a
  77.     ld  (_Tab+7849), a
  78.     ld  (_Tab+7853), a
  79.     ld  (_Tab+8091), a
  80.     ld  (_Tab+8687), a
  81.     ld  (_Tab+8691), a
  82.     ld.sis  (_Tab+8926), hl
  83.     ld.sis  (_Tab+8931), hl
  84.     ld  (_Tab+10128), a
  85.     ld  (_Tab+10129), a
  86.     ld.sis  (_Tab+10248), hl
  87.     ld  hl, 65793
  88.     ld  (_Tab+7250), hl
  89.     ld  (_Tab+7970), hl
  90.     ld  (_Tab+8448), hl
  91.     ld  (_Tab+8568), hl
  92.     ret
  93.  
  94.     XDEF    _Init
  95. _Init:
  96.     push    ix
  97.     ld  ix, 0
  98.     add ix, sp
  99.     lea hl, ix + -6
  100.     ld  sp, hl
  101.     ld  hl, 158
  102.     ld  iy, _Tab+121
  103. BB3_1:
  104.     ld  (ix + -6), iy
  105.     ld  (ix + -3), hl
  106.     ld  hl, 118
  107.     push    hl
  108.     or  a, a
  109.     sbc hl, hl
  110.     push    hl
  111.     push    iy
  112.     call    _memset
  113.     ld  hl, (ix + -3)
  114.     ld  iy, 9
  115.     add iy, sp
  116.     ld  sp, iy
  117.     ld  iy, (ix + -6)
  118.     lea iy, iy + 120
  119.     dec hl
  120.     add hl, bc
  121.     or  a, a
  122.     sbc hl, bc
  123.     jp  nz, BB3_1
  124.     ld.sis  hl, 257
  125.     ld.sis  (_Tab+6050), hl
  126.     ld.sis  (_Tab+6170), hl
  127.     ld  a, 1
  128.     ld  (_Tab+7369), a
  129.     ld  (_Tab+7373), a
  130.     ld  (_Tab+7488), a
  131.     ld  (_Tab+7494), a
  132.     ld  (_Tab+7608), a
  133.     ld  (_Tab+7614), a
  134.     ld  (_Tab+7731), a
  135.     ld  (_Tab+7849), a
  136.     ld  (_Tab+7853), a
  137.     ld  (_Tab+8091), a
  138.     ld  (_Tab+8687), a
  139.     ld  (_Tab+8691), a
  140.     ld.sis  (_Tab+8926), hl
  141.     ld.sis  (_Tab+8931), hl
  142.     ld  (_Tab+10128), a
  143.     ld  (_Tab+10129), a
  144.     ld.sis  (_Tab+10248), hl
  145.     ld  hl, 65793
  146.     ld  (_Tab+7250), hl
  147.     ld  (_Tab+7970), hl
  148.     ld  (_Tab+8448), hl
  149.     ld  (_Tab+8568), hl
  150.     ld  hl, 39
  151.     push    hl
  152.     call    _gfx_Begin
  153.     pop hl
  154.     or  a, a
  155.     sbc hl, hl
  156.     push    hl
  157.     call    _gfx_FillScreen
  158.     pop hl
  159.     call    _Update
  160. BB3_3:
  161.     call    _os_GetCSC
  162.     cp  a, 0
  163.     jp  z, BB3_3
  164.     jp  BB3_5
  165. BB3_4:
  166.     call    _MainLoop
  167. BB3_5:
  168.     call    _os_GetCSC
  169.     cp  a, 0
  170.     jp  z, BB3_4
  171.     ld  sp, ix
  172.     pop ix
  173.     ret
  174.  
  175.     XDEF    _MainLoop
  176. _MainLoop:
  177.     push    ix
  178.     ld  ix, 0
  179.     add ix, sp
  180.     lea hl, ix + -28
  181.     ld  sp, hl
  182.     ld  hl, 1
  183.     push    hl
  184.     call    _gfx_SetDraw
  185.     pop hl
  186.     or  a, a
  187.     sbc hl, hl
  188.     push    hl
  189.     call    _gfx_FillScreen
  190.     ld  de, 0
  191.     pop hl
  192.     ld  hl, 2
  193.     push    de
  194.     pop iy
  195.     ld  (ix + -22), hl
  196. BB4_1:
  197.     ld  bc, 1
  198.     ld  hl, (ix + -22)
  199.     call    __ior
  200.     lea bc, iy + 0
  201.     ld  (ix + -19), hl
  202.     ld  iy, (ix + -22)
  203.     lea hl, iy + 2
  204.     ld  (ix + -28), hl
  205.     ld  (ix + -25), bc
  206.     ld  (ix + -15), de
  207.     ld  hl, 2
  208.     ld  (ix + -12), hl
  209. BB4_2:
  210.     ld  (ix + -9), bc
  211.     push    de
  212.     call    _gfx_SetDraw
  213.     pop hl
  214.     ld  iy, (-1900524)
  215.     ld  de, (ix + -9)
  216.     add iy, de
  217.     ld  (ix + -6), iy
  218.     lea hl, iy + 0
  219.     ld  de, 642
  220.     add hl, de
  221.     ld  a, (hl)
  222.     ld  (ix + -16), a
  223.     ld  hl, 1
  224.     push    hl
  225.     lea hl, iy + 0
  226.     ld  de, 640
  227.     add hl, de
  228.     ld  a, (hl)
  229.     ld  de, 0
  230.     ld  e, a
  231.     lea hl, iy + 0
  232.     ld  bc, 644
  233.     add hl, bc
  234.     ld  a, (hl)
  235.     ld  bc, 0
  236.     push    bc
  237.     pop iy
  238.     ld  iyl, a
  239.     add iy, de
  240.     ld  hl, (ix + -6)
  241.     ld  de, 1280
  242.     add hl, de
  243.     ld  a, (hl)
  244.     push    bc
  245.     pop de
  246.     ld  e, a
  247.     add iy, de
  248.     ld  hl, (ix + -6)
  249.     ld  de, 1284
  250.     add hl, de
  251.     ld  a, (hl)
  252.     push    bc
  253.     pop de
  254.     ld  e, a
  255.     add iy, de
  256.     ld  hl, (ix + -6)
  257.     ld  a, (hl)
  258.     push    bc
  259.     pop de
  260.     ld  e, a
  261.     lea hl, iy + 0
  262.     add hl, de
  263.     ld  iy, (ix + -6)
  264.     ld  a, (iy + 4)
  265.     push    bc
  266.     pop de
  267.     ld  e, a
  268.     add hl, de
  269.     ld  iy, (ix + -6)
  270.     ld  a, (iy + 2)
  271.     push    bc
  272.     pop de
  273.     ld  e, a
  274.     add hl, de
  275.     push    hl
  276.     pop iy
  277.     ld  de, 1282
  278.     ld  hl, (ix + -6)
  279.     add hl, de
  280.     ld  a, (hl)
  281.     push    bc
  282.     pop de
  283.     ld  e, a
  284.     add iy, de
  285.     ld  (ix + -6), iy
  286.     call    _gfx_SetDraw
  287.     ld  bc, (ix + -6)
  288.     pop hl
  289.     push    bc
  290.     pop hl
  291.     ld  de, 765
  292.     or  a, a
  293.     sbc hl, de
  294.     add hl, de
  295.     jp  nz, BB4_4
  296.     ld  hl, (-1900524)
  297.     ld  de, (ix + -9)
  298.     add hl, de
  299.     ld  de, 642
  300.     add hl, de
  301.     ld  (hl), -1
  302.     ld  bc, 1
  303.     ld  hl, (ix + -12)
  304.     call    __ior
  305.     push    hl
  306.     pop de
  307.     add hl, hl
  308.     add hl, hl
  309.     push    de
  310.     pop bc
  311.     add hl, bc
  312.     add hl, hl
  313.     add hl, hl
  314.     add hl, hl
  315.     add hl, hl
  316.     add hl, hl
  317.     add hl, hl
  318.     ld  iy, (-1900524)
  319.     push    hl
  320.     pop bc
  321.     add iy, bc
  322.     ld  bc, (ix + -22)
  323.     add iy, bc
  324.     ld  a, -1
  325.     ld  bc, 640
  326.     jp  BB4_8
  327. BB4_4:
  328.     ld  a, (ix + -16)
  329.     ld  iy, (ix + -9)
  330.     push    bc
  331.     pop hl
  332.     ld  de, -510
  333.     add hl, de
  334.     ld  (ix + -3), hl
  335.     ld  de, (ix + -2)
  336.     or  a, a
  337.     sbc hl, hl
  338.     ld  l, e
  339.     ld  h, d
  340.     add hl, bc
  341.     or  a, a
  342.     sbc hl, bc
  343.     jp  z, BB4_6
  344.     ld  hl, (-1900524)
  345.     lea de, iy + 0
  346.     add hl, de
  347.     ld  de, 642
  348.     add hl, de
  349.     ld  (hl), 0
  350.     ld  bc, 1
  351.     ld  hl, (ix + -12)
  352.     call    __ior
  353.     push    hl
  354.     pop de
  355.     add hl, hl
  356.     add hl, hl
  357.     push    de
  358.     pop bc
  359.     add hl, bc
  360.     add hl, hl
  361.     add hl, hl
  362.     add hl, hl
  363.     add hl, hl
  364.     add hl, hl
  365.     add hl, hl
  366.     ld  iy, (-1900524)
  367.     push    hl
  368.     pop bc
  369.     add iy, bc
  370.     ld  bc, (ix + -22)
  371.     add iy, bc
  372.     xor a, a
  373.     ld  bc, 640
  374.     jp  BB4_8
  375. BB4_6:
  376.     push    bc
  377.     pop hl
  378.     ld  de, 510
  379.     or  a, a
  380.     sbc hl, de
  381.     add hl, de
  382.     ld  bc, 640
  383.     jp  nz, BB4_9
  384.     ld  hl, (-1900524)
  385.     ld  de, (ix + -9)
  386.     add hl, de
  387.     push    de
  388.     pop iy
  389.     ld  de, 642
  390.     add hl, de
  391.     ld  (hl), a
  392.     ld  hl, (-1900524)
  393.     lea de, iy + 0
  394.     add hl, de
  395.     ld  de, 962
  396.     add hl, de
  397.     ld  iy, (ix + -15)
  398.     lea de, iy + 3
  399.     push    hl
  400.     pop iy
  401. BB4_8:
  402.     ld  (iy), a
  403.     push    de
  404.     pop hl
  405.     add hl, hl
  406.     add hl, hl
  407.     add hl, de
  408.     add hl, hl
  409.     add hl, hl
  410.     add hl, hl
  411.     add hl, hl
  412.     add hl, hl
  413.     add hl, hl
  414.     ld  iy, (-1900524)
  415.     ex  de, hl
  416.     add iy, de
  417.     ld  de, (ix + -19)
  418.     add iy, de
  419.     ld  (iy), a
  420.     ld  hl, (-1900524)
  421.     ld  de, (ix + -9)
  422.     add hl, de
  423.     ld  de, 643
  424.     add hl, de
  425.     ld  (hl), a
  426. BB4_9:
  427.     ld  iy, (ix + -12)
  428.     lea iy, iy + 2
  429.     ld  (ix + -12), iy
  430.     ld  hl, (ix + -9)
  431.     add hl, bc
  432.     ld  (ix + -6), hl
  433.     ld  iy, (ix + -15)
  434.     lea iy, iy + 2
  435.     ld  c, 2
  436.     ld  (ix + -15), iy
  437.     lea hl, iy + 0
  438.     call    __ishru
  439.     ld  de, -59
  440.     add hl, de
  441.     ld  bc, (ix + -6)
  442.     ld  de, 0
  443.     jp  nc, BB4_2
  444.     ld  c, 2
  445.     ld  hl, (ix + -22)
  446.     call    __ishru
  447.     ld  iy, (ix + -25)
  448.     lea iy, iy + 2
  449.     ld  bc, -79
  450.     add hl, bc
  451.     ld  hl, (ix + -28)
  452.     ld  (ix + -22), hl
  453.     jp  nc, BB4_1
  454.     ld  sp, ix
  455.     pop ix
  456.     jp  _gfx_SwapDraw
  457.  
  458.     XDEF    _Update
  459. _Update:
  460.     push    ix
  461.     ld  ix, 0
  462.     add ix, sp
  463.     lea hl, ix + -15
  464.     ld  sp, hl
  465.     ld  iy, 2
  466.     ld  hl, _Tab+121
  467.     ld  (ix + -15), hl
  468.     ld  e, 2
  469. BB5_1:
  470.     ld  bc, 1
  471.     ld  (ix + -9), iy
  472.     lea hl, iy + 0
  473.     call    __ior
  474.     ld  (ix + -12), hl
  475.     or  a, a
  476.     sbc hl, hl
  477.     ld  (ix + -3), hl
  478.     ld  iy, (ix + -15)
  479. BB5_2:
  480.     ld  l, (iy)
  481.     ld  a, l
  482.     add a, -128
  483.     cp  a, -127
  484.     ld  (ix + -6), iy
  485.     ld  a, l
  486.     jp  c, BB5_5
  487.     cp  a, 1
  488.     jp  nz, BB5_8
  489.     ld  hl, 255
  490.     jp  BB5_7
  491. BB5_5:
  492.     cp  a, 0
  493.     jp  nz, BB5_8
  494.     or  a, a
  495.     sbc hl, hl
  496. BB5_7:
  497.     push    hl
  498.     call    _gfx_SetColor
  499.     pop hl
  500.     ld  iy, (ix + -3)
  501.     pea iy + 2
  502.     ld  hl, (ix + -9)
  503.     push    hl
  504.     call    _gfx_SetPixel
  505.     ld  hl, 6
  506.     add hl, sp
  507.     ld  sp, hl
  508.     ld  iy, (ix + -3)
  509.     pea iy + 2
  510.     ld  hl, (ix + -12)
  511.     push    hl
  512.     call    _gfx_SetPixel
  513.     ld  hl, 6
  514.     add hl, sp
  515.     ld  sp, hl
  516.     ld  iy, (ix + -3)
  517.     pea iy + 3
  518.     ld  hl, (ix + -12)
  519.     push    hl
  520.     call    _gfx_SetPixel
  521.     ld  hl, 6
  522.     add hl, sp
  523.     ld  sp, hl
  524.     ld  iy, (ix + -3)
  525.     pea iy + 3
  526.     ld  hl, (ix + -9)
  527.     push    hl
  528.     call    _gfx_SetPixel
  529.     ld  e, 2
  530.     ld  hl, 6
  531.     add hl, sp
  532.     ld  sp, hl
  533. BB5_8:
  534.     ld  iy, (ix + -3)
  535.     lea iy, iy + 2
  536.     ld  c, e
  537.     ld  (ix + -3), iy
  538.     lea hl, iy + 0
  539.     call    __ishru
  540.     ld  iy, (ix + -6)
  541.     inc iy
  542.     ld  bc, -59
  543.     add hl, bc
  544.     jp  nc, BB5_2
  545.     ld  c, e
  546.     ld  de, (ix + -9)
  547.     push    de
  548.     pop hl
  549.     call    __ishru
  550.     push    de
  551.     pop bc
  552.     ld  e, 2
  553.     ld  iy, (ix + -15)
  554.     lea iy, iy + 120
  555.     ld  (ix + -15), iy
  556.     push    bc
  557.     pop iy
  558.     lea iy, iy + 2
  559.     ld  bc, -79
  560.     add hl, bc
  561.     jp  nc, BB5_1
  562.     ld  sp, ix
  563.     pop ix
  564.     ret
  565.  
  566.     SEGMENT TEXT
  567.     XDEF    _COLS
  568. _COLS:
  569.     DW24    160
  570.  
  571.     XDEF    _ROWS
  572. _ROWS:
  573.     DW24    120
  574.  
  575. L_.str:
  576.     DB  71
  577.     DB  97
  578.     DB  109
  579.     DB  101
  580.     DB  32
  581.     DB  79
  582.     DB  102
  583.     DB  32
  584.     DB  76
  585.     DB  105
  586.     DB  102
  587.     DB  101
  588.     DB  33
  589.     DB  0
  590.  
  591. L_.str.1:
  592.     DB  80
  593.     DB  114
  594.     DB  101
  595.     DB  115
  596.     DB  115
  597.     DB  32
  598.     DB  65
  599.     DB  110
  600.     DB  121
  601.     DB  32
  602.     DB  107
  603.     DB  101
  604.     DB  121
  605.     DB  46
  606.     DB  46
  607.     DB  46
  608.     DB  0
  609.  
  610.     SEGMENT BSS
  611.     XDEF    _Tab
  612. _Tab:
  613.     DS  19200
  614.  
  615.  
  616.     XREF    _gfx_SetPixel
  617.     XREF    _gfx_SetColor
  618.     XREF    __ior
  619.     XREF    _memset
  620.     XREF    _gfx_FillScreen
  621.     XREF    _asm_HomeUp
  622.     XREF    _os_GetCSC
  623.     XREF    _gfx_End
  624.     XREF    __OS
  625.     XREF    _os_PutStrFull
  626.     XREF    _asm_DrawStatusBar
  627.     XREF    _gfx_Begin
  628.     XREF    _asm_ClrLCD
  629.     XREF    __ishru
  630.     XREF    _gfx_SwapDraw
  631.     XREF    _os_SetCursorPos
  632.     XREF    _gfx_SetDraw
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement