home *** CD-ROM | disk | FTP | other *** search
- .include #system
- .include #os
- .include #misc
- .include #handler.h65
-
- _value == $E0
- _string1 == $E2
- _hor == $E4
- _ver == $E5
- _tmp1 == $E6
- _tmp2 == $E8
- _tmp3 == $EA
- _screen == $EC
-
-
- .macro intro
- sta :savea
- txa
- pha
- jsr :intro
- s_print %$1
- .endm
-
- .macro outro
- .if %0 = 2
- tsx
- inx
- inx
- inx
- lda $100,X
- cmp #$C0
- .endif
- pla
- tax
- lda #>:outro-1
- pha
- lda #<:outro-1
- pha
- .if %0 = 2
- bcc njet
- lda osrts+1
- pha
- lda osrts
- pha
- njet
- .endif
- lda :savea
- jmp (%1)
- .endm
-
-
- start:
- jmp install
-
- ; --------------------------------------------------------------
- ; The CIO handlers that replace the old handlers
- ; --------------------------------------------------------------
- :open
- intro "נסדמ-" ; load ATARI 8-BIT font
- outro :xopen
- fix1 = * - 2
-
- :close
- intro "בכנצד-"
- outro :xclose
- fix2 = * - 2
-
-
- :get
- intro "ודק-"
- jsr :pr_icbll
- outro :xget
- fix3 = * - 2
-
-
- :put
- intro "סרק-"
- jsr :pr_icbll
- outro :xput,@special
- fix4 = * - 2
-
-
- :status
- intro "צקIJקרצ-"
- outro :xstatus
- fix5 = * - 2
-
-
- :special
- intro "צסדבחIJכ-Cmd: $"
- poke _value+1,0
- move iccomz,_value
- jsr :utoh
- jsr :space
- jsr :pr_icbll
- outro :xspecial
- fix6 = * - 2
-
-
- :intro
- move :savex,_hor
- move :savey,_ver
- rts
-
- :outro
- php
- pha
- txa
- pha
- tya
- pha
- sta _value
- .if AFTERBUFFER
- s_print " Y:$"
- .else
- s_print " Ret:$"
- .endif
- dpoke _string1,:buffer
- jsr :clrbuf
- lda _value
- jsr utob
- jsr s_print
- .if AFTERBUFFER
- s_print " $"
- jsr :pr_icbll2
- .endif
- ; now do the CONSOL key stuff
-
- jsr :space
- jsr s_return
-
- .if CONSOLKEY
- .if BLINKER
- lda COLOR4
- pha
- eor #$F4
- sta COLOR4
- .endif
- :wait
- lda CONSOL
- eor #7
- beq :wait
- cmp #4
- bcc :over
- :until
- lda CONSOL
- eor #7
- bne :until
- :over
- .if BLINKER
- pla
- sta COLOR4
- .endif
- move _hor,:savex
- move _ver,:savey
- .endif
- pla
- tay
- pla
- tax
- pla
- plp
- :nowhere
- rts
-
- ; --------------------------------------------------------------
- ; Print buffer address and length in HEX
- ; --------------------------------------------------------------
- :pr_icbal
- dmove ICBALZ,_value
- jmp :utoh
-
- :pr_icbll
- s_print "Buf:$"
- :pr_icbll2
- jsr :pr_icbal
- s_print ",$"
- dmove ICBLLZ,_value
-
- :utoh
- dpoke _string1,:buffer
- jsr :clrbuf
- jsr utoh
- dpoke _string1,:buffer
- jmp s_print
-
-
- :clrbuf
- ldx #osrts-:buffer-1
- lda #0
- :clr
- sta :buffer,x
- dex
- bne :clr
- rts
-
- :space
- dpoke _string1,:strspace
- jmp s_print
-
- :strspace
- .byte " ",0
-
- :savea .byte 0
- :savex .byte 0
- :savey .byte 0
-
- ourtab: .word :open-1,:close-1,:get-1,:put-1,:status-1,:special-1
- jmp :nowhere
-
- theirtab:
- :xopen .ds 2
- :xclose .ds 2
- :xget .ds 2
- :xput .ds 2
- :xstatus .ds 2
- :xspecial .ds 2
- :xinit .ds 3
-
- othertab .ds 15
-
- :buffer .ds 6
- osrts: .ds 2
-
-
-