Guest User

Untitled

a guest
Sep 2nd, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;
  2. ; File generated by cc65 v 2.13.3
  3. ;
  4.     .fopt       compiler,"cc65 v 2.13.3"
  5.     .setcpu     "65816"
  6.     .smart      on
  7.     .autoimport on
  8.     .case       on
  9.     .debuginfo  on
  10.     .importzp   sp, sreg, regsave, regbank, tmp1, ptr1, ptr2
  11.     .macpack    longbranch
  12.     .dbg        file, "cputc.c", 915, 1340431026
  13.     .dbg        file, "../../CC65-2.13/include/peekpoke.h", 3108, 1340336462
  14.     .export     _cputc
  15.  
  16. ; ---------------------------------------------------------------
  17. ; void __near__ cputc (unsigned char)
  18. ; ---------------------------------------------------------------
  19.  
  20. .segment    "CODE"
  21.  
  22. .proc   _cputc: near
  23.  
  24. .segment    "DATA"
  25.  
  26. L0003:
  27.     .byte   $00
  28. L0005:
  29.     .byte   $02
  30.  
  31. .segment    "CODE"
  32.  
  33. ;
  34. ; POKE( 0x300, cursorRow );
  35. ;
  36.     .dbg    line, "cputc.c", 12
  37.     lda     L0005
  38.     sta     $0300
  39. ;
  40. ; POKE( 0x310+cursorColumn, c );
  41. ;
  42.     .dbg    line, "cputc.c", 15
  43.     lda     L0003
  44.     clc
  45.     adc     #$10
  46.     sta     ptr1
  47.     lda     #$00
  48.     adc     #$03
  49.     sta     ptr1+1
  50.     lda     (sp)
  51.     sta     (ptr1)
  52. ;
  53. ; ++cursorColumn;
  54. ;
  55.     .dbg    line, "cputc.c", 19
  56.     inc     L0003
  57. ;
  58. ; if( cursorColumn > 79 )
  59. ;
  60.     .dbg    line, "cputc.c", 20
  61.     lda     L0003
  62.     cmp     #$50
  63.     bcc     L0017
  64. ;
  65. ; cursorColumn = 0;
  66. ;
  67.     .dbg    line, "cputc.c", 22
  68.     stz     L0003
  69. ;
  70. ; ++cursorRow;
  71. ;
  72.     .dbg    line, "cputc.c", 23
  73.     inc     L0005
  74. ;
  75. ; if( cursorRow > 49 )
  76. ;
  77.     .dbg    line, "cputc.c", 24
  78.     lda     L0005
  79.     cmp     #$32
  80.     bcc     L0017
  81. ;
  82. ; cursorRow = 49; // Write back over the bottom row for now...
  83. ;
  84.     .dbg    line, "cputc.c", 27
  85.     lda     #$31
  86.     sta     L0005
  87. ;
  88. ; POKE( 0x301, cursorColumn );
  89. ;
  90.     .dbg    line, "cputc.c", 32
  91. L0017:  lda     L0003
  92.     sta     $0301
  93. ;
  94. ; POKE( 0x302, cursorRow );
  95. ;
  96.     .dbg    line, "cputc.c", 33
  97.     lda     L0005
  98.     sta     $0302
  99. ;
  100. ; }
  101. ;
  102.     .dbg    line, "cputc.c", 34
  103.     jmp     incsp1
  104.     .dbg    line
  105.  
  106. .endproc
Add Comment
Please, Sign In to add comment