home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_26_1988_Transactor_Publishing.d64
/
calibrate.ml
< prev
next >
Wrap
Text File
|
2023-02-26
|
2KB
|
52 lines
8000 ;"calibrate.ml"
8010 * =$3000 ;12288
8020 ml ldx #$02 ;turn on port
8030 jsr $ffc6 ;(now nchkin)
8040 jsr setirq ;set up "modem"
8050 getchr jsr $ffe4 ;getin loop
8060 cmp #$55
8070 beq getchr ;$55 is ok
8080 jsr $ffb7
8090 bne getchr ;buffer empty ok
8100 lda #$2a ;else print "*"
8110 jsr $ffd2
8120 jmp getchr
8130 irq lda #$ff ;output byte to
8140 sta $dc0c ; serial port
8150 lda $dc0d ;clear irq
8160 jmp ($0256) ;"ri" return
8170 setirq sei
8180 ldx $fb ;"cn" modem speed
8190 ldy $fc
8200 lda #$00
8210 sta $d01a ;raster irq off
8220 sta $dc0f ;stop timer b
8230 lda #$7f
8240 sta $dc0d ;nmi disabled
8250 sta $d019 ;clr raster irq
8260 stx $dc04 ;cnt modem uses
8270 sty $dc05 ; timer a
8280 lda #$51 ;serial=output,
8290 sta $dc0e ; timer a on
8300 ldy #$ff
8310 sty $dc0c ;start 1st byte
8320 ldx #$05 ;wait a few bits
8330 again lda $dc0d
8340 and #$01
8350 beq again
8360 dex
8370 bne again
8380 sty $dc0c ;then 2nd byte
8390 lda #<irq ;irq will keep
8400 sta $0314 ; sp one byte
8410 lda #>irq ; ahead.
8420 sta $0315
8430 lda #$88 ;enable sp irq
8440 sta $dc0d
8450 cli
8460 blank rts ;or nop (ml+107)
8470 lda $d011 ;blank 40 screen
8480 and #$ef ;(turns off dma)
8490 sta $d011
8500 rts ;ml+116