home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1991 September / 64er_Magazin_91-09_1991_Markt__Technik_de_Side_A.d64 / protokoll.src < prev    next >
Text File  |  2022-10-26  |  7KB  |  333 lines

  1.  
  2. ;=======================================
  3. ; basic-zeile mit sys-adresse
  4. ;=======================================
  5.  
  6.              * = $0801 ;prog.start
  7.  
  8.              .byte $0d,$08,$b2,$07
  9.              .byte $9e,$28,$32,$30
  10.              .byte $36,$35,$29,$00
  11.              .byte $00,$00,$ea,$ea
  12.              .byte $ea,$ea,$ea,$ea
  13.  
  14. ;=======================================
  15. ; initialisierung
  16. ;=======================================
  17.  
  18. ;---------------------------------------
  19. ; kopieren des basic aus dem rom ins ram
  20. ;---------------------------------------
  21.  
  22.              von1 = $a000
  23.              bis1 = $c000
  24.  
  25.              lda# <von1
  26.              sta $fa
  27.              lda# >von1
  28.              sta $fb
  29.              lda# <bis1
  30.              sta $fc
  31.              lda# >bis1
  32.              sta $fd
  33.  
  34.              ldy# 0
  35.  
  36. kop2         lda ($fa),y
  37.              sta ($fa),y
  38.  
  39.              inc $fa
  40.              bne kop3
  41.              inc $fb
  42.  
  43. kop3         ldx $fd
  44.              cpx $fb
  45.              bne kop2
  46.              ldx $fc
  47.              cpx $fa
  48.              bne kop2
  49.  
  50. ;---------------------------------------
  51. ; kernal aus dem rom ins ram
  52. ;---------------------------------------
  53.  
  54.              von2 = $e000
  55.              bis2 = $0000
  56.  
  57.              lda# <von2
  58.              sta $fa
  59.              lda# >von2
  60.              sta $fb
  61.              lda# <bis2
  62.              sta $fc
  63.              lda# >bis2
  64.              sta $fd
  65.  
  66.              ldy# 0
  67.  
  68. kopb         lda ($fa),y
  69.              sta ($fa),y
  70.  
  71.              inc $fa
  72.              bne kopc
  73.              inc $fb
  74.  
  75. kopc         ldx $fd
  76.              cpx $fb
  77.              bne kopb
  78.              ldx $fc
  79.              cpx $fa
  80.              bne kopb
  81.  
  82. ;---------------------------------------
  83. ; verlegen bis ziel-1 nach $e422
  84. ; kopieren
  85. ;---------------------------------------
  86.  
  87. cop1         lda# <verlegen
  88.              sta $fa
  89.              lda# >verlegen
  90.              sta $fb
  91.              lda# $22
  92.              sta $fc
  93.              lda# $e4
  94.              sta $fd
  95.  
  96.              ldy# $00
  97.  
  98. cop2         lda ($fa),y
  99.              sta ($fc),y
  100.  
  101.              inc $fc
  102.              bne cop3
  103.              inc $fd
  104.  
  105. cop3         inc $fa
  106.              bne cop4
  107.              inc $fb
  108.  
  109. cop4         ldx $fb
  110.              cpx# >ziel
  111.              bne cop2
  112.              ldx $fa
  113.              cpx# <ziel
  114.              bne cop2
  115.  
  116. ;---------------------------------------
  117. ; ziel bis hilfe-1 nach $e460
  118. ; kopieren
  119. ;---------------------------------------
  120.  
  121. copa         lda# <ziel
  122.              sta $fa
  123.              lda# >ziel
  124.              sta $fb
  125.              lda# $60
  126.              sta $fc
  127.              lda# $e4
  128.              sta $fd
  129.  
  130.              ldy# $00
  131.  
  132. copb         lda ($fa),y
  133.              sta ($fc),y
  134.  
  135.              inc $fc
  136.              bne copc
  137.              inc $fd
  138.  
  139. copc         inc $fa
  140.              bne copd
  141.              inc $fb
  142.  
  143. copd         ldx $fb
  144.              cpx# >hilfe
  145.              bne copb
  146.              ldx $fa
  147.              cpx# <hilfe
  148.              bne copb
  149.  
  150. ;---------------------------------------
  151. ; chrout bei $e716 auf erweiterung
  152. ; zeigen lassen   (drucker-ausgabe)
  153. ;---------------------------------------
  154.  
  155. chr1         lda# $4c
  156.              ldx# $60   ; jmp $e460
  157.              ldy# $e4
  158.              sta $e716
  159.              stx $e717
  160.              sty $e718
  161.  
  162. ;---------------------------------------
  163. ; irq bei $ea31 auf erweiterung zeigen
  164. ; lassen  (tasten-abfrage)
  165. ;---------------------------------------
  166.  
  167. irq1
  168.              ldx# $25     ; jsr $e422+3
  169.              ldy# $e4
  170.  
  171.              stx $ea32
  172.              sty $ea33
  173.  
  174. ;---------------------------------------
  175. ; kontrollregister auf null setzen
  176. ;---------------------------------------
  177.  
  178. kon1         lda# 0
  179.              sta $e445 ;kontrolle
  180.  
  181. ;---------------------------------------
  182. ; neues kernel einschalten
  183. ;---------------------------------------
  184.  
  185. neu          lda# .53
  186.              sta $01
  187.  
  188. ;---------------------------------------
  189. ; text ausgeben
  190. ;---------------------------------------
  191.  
  192.              ldx# $00
  193. ausgeben     lda text,x
  194.              beq ausgeben1
  195.              jsr $ffd2 ;chrout
  196.              inx
  197.              bne ausgeben
  198.  
  199. ausgeben1    rts ;basic
  200.  
  201. ;=======================================
  202. ; hauptroutinen, die ins kernal
  203. ; kopiert werden
  204. ;=======================================
  205.  
  206. ;---------------------------------------
  207. ; jmp $a644 der ausgabe-routine der ein-
  208. ; schaltmeldung vorverlegen
  209. ;---------------------------------------
  210.  
  211. verlegen     .byte $4c,$44,$a6
  212.  
  213. ;---------------------------------------
  214. ; irq-abfrage
  215. ;---------------------------------------
  216.  
  217. sprung       ldx $028d
  218.  
  219.              cpx# $07 ;shift ctrl c=
  220.              bne sprung1
  221.  
  222.              inc $d021 ;hintergrund
  223.              dec $d021 ;bestaetigung
  224.  
  225.              cpx $e446 ;speicher
  226.              beq sprung1
  227.  
  228.              lda $e445 ;kontrolle
  229.              eor# $ea
  230.              sta $e445 ;kontrolle
  231.  
  232. sprung1      stx $e446 ;speicher
  233.  
  234.              jmp $ffea ;irq weiter
  235.  
  236. ;---------------------------------------
  237.  
  238. kontrolle    nop
  239.  
  240. ;---------------------------------------
  241.  
  242. speicher     nop
  243.  
  244. ;---------------------------------------
  245. ; protokoll auf drucker
  246. ;---------------------------------------
  247.  
  248. ziel         pha
  249.              lda $e445 ;kontrolle
  250.              beq ziel1
  251.  
  252.              txa
  253.              pha
  254.              tya
  255.              pha
  256.              ldy# $01 ;gross/grafik
  257.              lda $d018
  258.              ror
  259.              ror
  260.              bcc gross
  261.              ldy# $07 ;gross/klein
  262.  
  263. gross        lda# $04
  264.              ldx# $04 ;drucker
  265.              jsr $ffba ;setfls
  266.              lda# $00
  267.              jsr $ffbd ;setnam
  268.              jsr $ffc0 ;open
  269.              bcs fehler ;fehlermeldung
  270.              ldx# 4 ;drucker
  271.              jsr $ffc9 ;chkout
  272.              pla
  273.              tay
  274.              pla
  275.              tax
  276.  
  277.              pla
  278.              jsr $ffd2 ;chrout
  279.              pha
  280.              txa
  281.              pha
  282.              tya
  283.              pha
  284.              lda# 4
  285.              jsr $ffc3 ;close
  286.              lda# $03 ;ausgabegeraet
  287.              sta $9a ;bildschirm
  288.  
  289. fehler       pla
  290.              tay
  291.              pla
  292.              tax
  293.  
  294. ziel1        pla
  295.              pha
  296.              sta $d7
  297.              jmp $e719 ;chrout weiter
  298.  
  299. ;---------------------------------------
  300.  
  301. hilfe        nop  ;kopierhilfe
  302.  
  303. ;---------------------------------------
  304.  
  305. text     .byte $0d
  306.          .byte 'initialisierung '
  307.          .byte 'beendet',$0d
  308.          .byte 'ein- und ausschalten: '
  309.          .byte 'shift + c= + ctrl',$0d
  310.          .byte 'nach einem reset mit '
  311.          .byte 'poke 1,53 wieder ',$0d
  312.          .byte 'aktivierbar!',$0d
  313.          .byte $0d,$00
  314.  
  315. .end
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.