cc65-Chess/src/atmos/platOrica.s

839 lines
26 KiB
ArmAsm

;) _
;) ___ ___ _ _|_|___ ___
;) | _| .'|_'_| |_ -|_ -|
;) |_| |__,|_,_|_|___|___|
;) raxiss (c) 2020
; ======================================================================
; cc65 chess for Oric
; ======================================================================
; ------------------------------------------------------------------------
.export __TAPE__:abs = 1
.import __AUTORUN__, __PROGFLAG__
.import __BASHEAD_START__, __MAIN_LAST__
.segment "TAPE"
.byte $16, $16, $16, $16, $24, $00, $00
.byte <__PROGFLAG__
.byte <__AUTORUN__
.dbyt __MAIN_LAST__ - 1
.dbyt __BASHEAD_START__
.byte $00
.byte "CC65-CHESS",0
; ======================================================================
.segment "CODE"
; ----------------------------------------------------------------------
scrnoff = $a000
rst = $fffc
irq = $fffe
hires_atmos = $ec33
hires_oric1 = $e9bb
getkey_atmos = $eb78
getkey_oric1 = $e905
; ----------------------------------------------------------------------
BOARD_PIECE_WIDTH = 3
BOARD_PIECE_HEIGHT = 20
; ----------------------------------------------------------------------
; ======================================================================
_setup:
lda irq
cmp #$28
beq isOric1
isAtmos: lda #<hires_atmos
sta _hires+1
lda #>hires_atmos
sta _hires+2
lda #<getkey_atmos
sta _getkey+1
lda #>getkey_atmos
sta _getkey+2
jmp _hires
isOric1: lda #<hires_oric1
sta _hires+1
lda #>hires_oric1
sta _hires+2
lda #<getkey_oric1
sta _getkey+1
lda #>getkey_oric1
sta _getkey+2
; ----------------------------------------------------------------------
_hires: jsr $f00d
lda #$08
sta $26a
rts
; ----------------------------------------------------------------------
_quit: lda rst
sta l00_aptr+1
lda rst+1
sta l00_aptr+2
sei
l00_aptr: jmp $dead
; ----------------------------------------------------------------------
_getkey: jsr $f00d
and #$7f
beq test
cmp #$0d
test:
ldx #$00
rts
; ======================================================================
_hires_xpos: .byte 0
_hires_ypos: .byte 0
_hires_xsize: .byte 0
_hires_ysize: .byte 0
_hires_rop: .byte 0
_hires_clr: .byte 0
_hires_src: .word 0
; ----------------------------------------------------------------------
_hires_MaskA:
clc
ldx _hires_ypos
lda _scrnlo,x
adc _hires_xpos
sta l01_adst+1
lda _scrnhi,x
adc #0
sta l01_adst+2
l01_loop: ldx #0
lda _hires_rop
l01_adst: sta $f00d,x
inx
cpx _hires_xsize
bne l01_adst
clc
lda l01_adst+1
adc #40
sta l01_adst+1
lda l01_adst+2
adc #0
sta l01_adst+2
dec _hires_ysize
bne l01_loop
rts
; ----------------------------------------------------------------------
_hires_DrawA:
lda _hires_src
sta l02_asrc+1
lda _hires_src+1
sta l02_asrc+2
clc
ldx _hires_ypos
lda _scrnlo,x
adc _hires_xpos
sta l02_adst+1
lda _scrnhi,x
adc #0
sta l02_adst+2
ldy _hires_ysize
l02_loop: ldx #0
l02_asrc: lda $f00d,x
ora _hires_rop
l02_adst: sta $f00d,x
inx
cpx _hires_xsize
bne l02_asrc
clc
lda #<3*7
adc l02_asrc+1
sta l02_asrc+1
lda #>3*7
adc l02_asrc+2
sta l02_asrc+2
clc
lda #<40
adc l02_adst+1
sta l02_adst+1
lda #>40
adc l02_adst+2
sta l02_adst+2
dey
bne l02_loop
rts
; ----------------------------------------------------------------------
_hires_SelectA:
lda _hires_src
sta l03_asrc+1
lda _hires_src+1
sta l03_asrc+2
clc
ldx _hires_ypos
lda _scrnlo,x
adc _hires_xpos
sta l03_adst+1
sta l03_arop+1
lda _scrnhi,x
adc #0
sta l03_adst+2
sta l03_arop+2
ldy _hires_ysize
l03_loop: ldx #0
l03_asrc: lda $f00d,x
l03_arop: eor $f00d,x
ora #$40
l03_adst: sta $f00d,x
inx
cpx _hires_xsize
bne l03_asrc
clc
lda #<3*7
adc l03_asrc+1
sta l03_asrc+1
lda #>3*7
adc l03_asrc+2
sta l03_asrc+2
clc
lda #<40
adc l03_adst+1
sta l03_adst+1
sta l03_arop+1
lda #>40
adc l03_adst+2
sta l03_adst+2
sta l03_arop+2
dey
bne l03_loop
rts
; ----------------------------------------------------------------------
_hires_DrawCharA:
lda _hires_src
sta l04_asrc+1
lda _hires_src+1
sta l04_asrc+2
clc
ldx _hires_ypos
lda _scrnlo,x
adc _hires_xpos
sta l04_adst+1
lda _scrnhi,x
adc #0
sta l04_adst+2
ldx #0
l04_loop:
l04_asrc: lda $f00d,x
ora _hires_rop
l04_adst: sta $f00d
clc
lda #<40
adc l04_adst+1
sta l04_adst+1
lda #>40
adc l04_adst+2
sta l04_adst+2
inx
cpx #8
bne l04_loop
rts
; ----------------------------------------------------------------------
_hires_DrawClrA:
clc
ldx _hires_ypos
lda _scrnlo,x
adc _hires_xpos
sta l05_adst+1
lda _scrnhi,x
adc #0
sta l05_adst+2
ldx #8
l05_loop: lda _hires_clr
l05_adst: sta $f00d
clc
lda #<40
adc l05_adst+1
sta l05_adst+1
lda #>40
adc l05_adst+2
sta l05_adst+2
dex
bne l05_loop
rts
; ----------------------------------------------------------------------
_hires_CharSet = $9900
; ----------------------------------------------------------------------
_hires_Pieces:
_pieces:
.byte $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
.byte $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
.byte $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$4e,$5c,$58
.byte $40,$58,$40,$40,$4c,$40,$40,$4c,$40,$40,$4c,$40,$40,$40,$40,$40
.byte $40,$40,$4e,$5c,$68,$40,$5c,$40,$40,$4c,$40,$40,$61,$40,$40,$56
.byte $40,$40,$40,$40,$40,$40,$40,$4f,$77,$50,$41,$7e,$40,$40,$5a,$40
.byte $41,$7e,$60,$40,$4c,$40,$40,$4c,$40,$40,$40,$40,$47,$6a,$68,$43
.byte $77,$40,$40,$7d,$40,$41,$7d,$40,$41,$6d,$60,$40,$5e,$40,$40,$40
.byte $40,$47,$7f,$50,$47,$7f,$40,$40,$7a,$40,$40,$40,$40,$40,$40,$40
.byte $40,$5e,$40,$40,$40,$40,$43,$7e,$60,$47,$7f,$60,$40,$7f,$40,$41
.byte $7e,$60,$41,$7e,$60,$40,$40,$40,$40,$40,$40,$41,$7f,$40,$47,$7f
.byte $60,$40,$40,$40,$41,$7d,$40,$41,$7d,$40,$41,$7f,$60,$40,$40,$40
.byte $41,$7f,$40,$40,$4f,$60,$41,$7f,$60,$40,$7e,$60,$40,$7e,$60,$40
.byte $40,$40,$40,$40,$40,$41,$7b,$40,$40,$4f,$40,$40,$7f,$40,$40,$40
.byte $40,$40,$40,$40,$40,$5e,$40,$40,$40,$40,$41,$7d,$40,$40,$4e,$60
.byte $40,$40,$40,$40,$5e,$40,$40,$5e,$40,$40,$5e,$40,$40,$40,$40,$41
.byte $7a,$40,$40,$5f,$50,$40,$5e,$40,$40,$5e,$40,$40,$7f,$40,$40,$5a
.byte $40,$40,$40,$40,$41,$75,$40,$40,$7e,$60,$40,$5e,$40,$40,$7f,$40
.byte $40,$7f,$40,$40,$7d,$40,$40,$40,$40,$41,$7a,$40,$40,$7d,$50,$40
.byte $7f,$40,$40,$7f,$40,$41,$7d,$60,$41,$7a,$60,$40,$40,$40,$41,$75
.byte $40,$40,$7a,$60,$41,$7e,$60,$41,$7e,$60,$41,$7e,$60,$41,$75,$40
.byte $40,$40,$40,$40,$40,$40,$43,$7d,$50,$43,$7f,$50,$43,$7d,$50,$43
.byte $7d,$50,$40,$40,$40,$40,$40,$40,$47,$7f,$50,$40,$40,$40,$47,$7e
.byte $68,$47,$7e,$68,$47,$7e,$68,$47,$7f,$68,$40,$40,$40,$4f,$7e,$68
.byte $47,$7f,$68,$4f,$7d,$54,$4f,$7d,$54,$4f,$7d,$54,$4f,$7f,$54,$40
.byte $40,$40,$4f,$7d,$58,$4f,$7f,$54,$4f,$7e,$68,$4f,$7a,$68,$4f,$7a
.byte $68,$4f,$7e,$68,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
.byte $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
.byte $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$7f,$7f
.byte $7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f
.byte $7f,$7f,$7f,$7f,$7f,$7f,$60,$40,$43,$7f,$43,$7f,$7f,$61,$7f,$7f
.byte $61,$7f,$7f,$61,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$6e,$5c,$5b,$7f,$59
.byte $7f,$7f,$6d,$7f,$7e,$4c,$5f,$7f,$4c,$7f,$7f,$7f,$7f,$7f,$7f,$7f
.byte $6e,$5c,$6b,$7c,$5c,$7f,$7f,$4c,$7f,$7c,$61,$4f,$7f,$56,$7f,$7f
.byte $61,$7f,$7f,$7f,$7f,$6f,$77,$53,$79,$7e,$5f,$7e,$5a,$5f,$7d,$7e
.byte $6f,$7c,$4c,$4f,$7f,$4c,$7f,$7f,$7f,$7f,$67,$6a,$6b,$73,$77,$5f
.byte $7e,$7d,$5f,$7d,$7d,$4f,$7d,$6d,$6f,$7f,$5e,$7f,$7f,$7f,$7f,$77
.byte $7f,$53,$77,$7f,$4f,$7e,$7a,$5f,$7c,$40,$4f,$7c,$40,$4f,$7f,$5e
.byte $7f,$7f,$7f,$7f,$73,$7e,$67,$77,$7f,$6f,$7e,$7f,$5f,$7d,$7e,$6f
.byte $7d,$7f,$6f,$7c,$40,$4f,$7f,$7f,$7f,$79,$7f,$4f,$77,$7f,$6f,$7c
.byte $40,$4f,$7d,$7d,$4f,$7d,$7f,$4f,$7d,$7f,$6f,$7f,$7f,$7f,$7d,$7f
.byte $5f,$70,$4f,$6f,$7d,$7f,$6f,$7c,$7e,$6f,$7e,$7e,$5f,$7c,$40,$4f
.byte $7f,$7f,$7f,$7d,$7b,$5f,$7f,$6f,$4f,$7c,$7f,$4f,$7e,$40,$4f,$7f
.byte $40,$7f,$7f,$5e,$7f,$7f,$7f,$7f,$7d,$7d,$5f,$7f,$4e,$67,$7e,$40
.byte $5f,$7f,$5e,$7f,$7e,$5e,$5f,$7f,$5e,$7f,$7f,$7f,$7f,$7d,$7a,$5f
.byte $7e,$5f,$57,$7f,$5e,$7f,$7e,$5e,$5f,$7e,$7f,$5f,$7e,$5a,$5f,$7f
.byte $7f,$7f,$7d,$75,$5f,$7e,$7e,$67,$7e,$5e,$5f,$7e,$7f,$5f,$7c,$7f
.byte $4f,$7c,$7d,$4f,$7f,$7f,$7f,$7d,$7a,$5f,$7e,$7d,$57,$7c,$7f,$4f
.byte $7c,$7f,$4f,$7d,$7f,$6f,$7d,$7a,$6f,$7f,$7f,$7f,$7d,$75,$5f,$78
.byte $7a,$67,$79,$7e,$67,$79,$7e,$67,$79,$7e,$67,$7d,$75,$4f,$7f,$7f
.byte $7f,$70,$40,$47,$7b,$7d,$5f,$73,$7f,$53,$73,$7d,$53,$73,$7d,$53
.byte $70,$40,$43,$7f,$7f,$7f,$67,$7f,$53,$70,$40,$43,$67,$7e,$69,$67
.byte $7e,$69,$67,$7e,$69,$67,$7f,$69,$7f,$7f,$7f,$6f,$7e,$6b,$67,$7f
.byte $69,$6f,$7d,$55,$6f,$7d,$55,$6f,$7d,$55,$6f,$7f,$55,$7f,$7f,$7f
.byte $6f,$7d,$53,$6f,$7f,$55,$6f,$7e,$69,$6f,$7a,$69,$6f,$7a,$69,$6f
.byte $7e,$69,$7f,$7f,$7f,$60,$40,$43,$60,$40,$41,$60,$40,$41,$60,$40
.byte $41,$60,$40,$41,$60,$40,$41,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f
.byte $7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$7f,$6a,$6a,$6a,$40
.byte $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$40
.byte $40,$50,$40,$41,$5f,$7f,$7c,$40,$7c,$40,$40,$5e,$40,$40,$5e,$40
.byte $40,$5e,$40,$40,$40,$40,$60,$40,$42,$51,$63,$44,$40,$66,$40,$40
.byte $52,$40,$41,$73,$60,$40,$73,$40,$40,$40,$40,$50,$40,$41,$51,$63
.byte $44,$43,$63,$40,$40,$73,$40,$43,$5e,$70,$40,$69,$40,$40,$5e,$40
.byte $60,$40,$42,$50,$48,$4c,$46,$41,$60,$41,$60,$60,$42,$61,$50,$43
.byte $73,$70,$40,$73,$40,$50,$40,$41,$58,$54,$54,$4c,$48,$60,$41,$42
.byte $60,$42,$40,$70,$42,$52,$50,$40,$69,$40,$60,$40,$42,$48,$40,$6c
.byte $48,$40,$70,$41,$44,$60,$41,$7f,$60,$41,$7f,$60,$40,$61,$40,$50
.byte $40,$41,$4c,$41,$58,$48,$40,$50,$41,$40,$60,$42,$40,$50,$42,$40
.byte $50,$43,$7f,$70,$60,$40,$42,$46,$40,$70,$48,$40,$50,$43,$7f,$70
.byte $42,$40,$70,$42,$40,$70,$42,$40,$50,$50,$40,$41,$42,$40,$60,$4f
.byte $70,$50,$42,$40,$50,$43,$41,$50,$41,$41,$60,$43,$7f,$70,$60,$40
.byte $42,$42,$40,$60,$40,$50,$70,$43,$40,$70,$41,$7f,$60,$40,$7f,$40
.byte $40,$61,$40,$50,$40,$41,$42,$42,$60,$40,$71,$58,$41,$7f,$60,$40
.byte $61,$40,$41,$61,$60,$40,$61,$40,$60,$40,$42,$42,$44,$60,$41,$60
.byte $68,$40,$61,$40,$41,$61,$60,$41,$40,$60,$41,$61,$60,$50,$40,$41
.byte $42,$4a,$60,$41,$41,$58,$41,$61,$60,$41,$40,$60,$43,$40,$70,$43
.byte $40,$70,$60,$40,$42,$42,$45,$60,$41,$42,$68,$43,$40,$70,$43,$40
.byte $70,$42,$40,$50,$42,$41,$50,$50,$40,$41,$42,$4a,$60,$47,$45,$58
.byte $46,$41,$58,$46,$41,$58,$46,$41,$58,$42,$42,$70,$60,$40,$42,$4f
.byte $7f,$78,$44,$42,$60,$4c,$40,$6c,$4c,$42,$6c,$4c,$42,$6c,$4f,$7f
.byte $7c,$50,$40,$41,$58,$40,$6c,$4f,$7f,$7c,$58,$41,$56,$58,$41,$56
.byte $58,$41,$56,$58,$40,$56,$60,$40,$42,$50,$41,$54,$58,$40,$56,$50
.byte $42,$6a,$50,$42,$6a,$50,$42,$6a,$50,$40,$6a,$50,$40,$41,$50,$42
.byte $6c,$50,$40,$6a,$50,$41,$56,$50,$45,$56,$50,$45,$56,$50,$41,$56
.byte $60,$40,$42,$5f,$7f,$7c,$5f,$7f,$7e,$5f,$7f,$7e,$5f,$7f,$7e,$5f
.byte $7f,$7e,$5f,$7f,$7e,$55,$55,$55,$40,$40,$40,$40,$40,$40,$40,$40
.byte $40,$40,$40,$40,$40,$40,$40,$40,$40,$40,$6a,$6a,$6a,$40,$40,$41
.byte $7f,$43,$7f,$7f,$61,$7f,$7f,$61,$7f,$7f,$61,$7f,$7f,$7f,$7f,$40
.byte $40,$41,$5f,$7f,$7d,$7e,$7c,$7f,$7f,$5e,$7f,$7c,$5e,$4f,$7e,$5e
.byte $5f,$7f,$7f,$7f,$60,$40,$40,$51,$63,$45,$78,$66,$5f,$7e,$52,$5f
.byte $79,$73,$67,$7e,$73,$5f,$7f,$40,$7f,$40,$40,$41,$51,$63,$45,$73
.byte $63,$4f,$7c,$73,$4f,$7b,$5e,$77,$78,$69,$47,$7e,$5e,$5f,$60,$40
.byte $40,$50,$48,$4d,$66,$41,$6f,$7d,$60,$6f,$7a,$61,$57,$7b,$73,$77
.byte $7e,$73,$5f,$40,$40,$41,$58,$54,$55,$6c,$48,$67,$7d,$42,$6f,$7a
.byte $40,$77,$7a,$52,$57,$7e,$69,$5f,$60,$40,$40,$48,$40,$6d,$68,$40
.byte $77,$7d,$44,$6f,$79,$7f,$67,$79,$7f,$67,$78,$61,$47,$40,$40,$41
.byte $6c,$41,$59,$68,$40,$57,$79,$40,$67,$7a,$40,$57,$7a,$40,$57,$7b
.byte $7f,$77,$60,$40,$40,$66,$40,$73,$68,$40,$57,$7b,$7f,$77,$7a,$40
.byte $77,$7a,$40,$77,$7a,$40,$57,$40,$40,$41,$72,$40,$67,$6f,$70,$57
.byte $7a,$40,$57,$7b,$41,$57,$7d,$41,$67,$7b,$7f,$77,$60,$40,$40,$7a
.byte $40,$6f,$60,$50,$73,$7b,$40,$77,$79,$7f,$67,$7c,$7f,$4f,$78,$61
.byte $47,$40,$40,$41,$7a,$42,$6f,$7c,$71,$5b,$79,$7f,$67,$7c,$61,$4f
.byte $7d,$61,$6f,$7c,$61,$4f,$60,$40,$40,$7a,$44,$6f,$7d,$60,$6b,$7c
.byte $61,$4f,$7d,$61,$6f,$79,$40,$67,$79,$61,$67,$40,$40,$41,$7a,$4a
.byte $6f,$7d,$41,$5b,$79,$61,$67,$79,$40,$67,$7b,$40,$77,$7b,$40,$77
.byte $60,$40,$40,$7a,$45,$6f,$71,$42,$6b,$73,$40,$73,$73,$40,$73,$72
.byte $40,$53,$7a,$41,$57,$40,$40,$41,$62,$4a,$63,$77,$45,$5b,$66,$41
.byte $59,$66,$41,$59,$66,$41,$59,$62,$42,$71,$60,$40,$40,$4f,$7f,$79
.byte $64,$42,$61,$4c,$40,$6c,$4c,$42,$6c,$4c,$42,$6c,$4f,$7f,$7c,$40
.byte $40,$41,$58,$40,$6d,$4f,$7f,$7c,$58,$41,$56,$58,$41,$56,$58,$41
.byte $56,$58,$40,$56,$60,$40,$40,$50,$41,$55,$58,$40,$56,$50,$42,$6a
.byte $50,$42,$6a,$50,$42,$6a,$50,$40,$6a,$40,$40,$41,$50,$42,$6d,$50
.byte $40,$6a,$50,$41,$56,$50,$45,$56,$50,$45,$56,$50,$41,$56,$60,$40
.byte $40,$5f,$7f,$7d,$5f,$7f,$7e,$5f,$7f,$7e,$5f,$7f,$7e,$5f,$7f,$7e
.byte $5f,$7f,$7e,$55,$55,$55,$40,$40,$41,$40,$40,$40,$40,$40,$40,$40
.byte $40,$40,$40,$40,$40,$40,$40,$40
_scrnlo:
.byte <($a000+( 0*40))
.byte <($a000+( 1*40))
.byte <($a000+( 2*40))
.byte <($a000+( 3*40))
.byte <($a000+( 4*40))
.byte <($a000+( 5*40))
.byte <($a000+( 6*40))
.byte <($a000+( 7*40))
.byte <($a000+( 8*40))
.byte <($a000+( 9*40))
.byte <($a000+( 10*40))
.byte <($a000+( 11*40))
.byte <($a000+( 12*40))
.byte <($a000+( 13*40))
.byte <($a000+( 14*40))
.byte <($a000+( 15*40))
.byte <($a000+( 16*40))
.byte <($a000+( 17*40))
.byte <($a000+( 18*40))
.byte <($a000+( 19*40))
.byte <($a000+( 20*40))
.byte <($a000+( 21*40))
.byte <($a000+( 22*40))
.byte <($a000+( 23*40))
.byte <($a000+( 24*40))
.byte <($a000+( 25*40))
.byte <($a000+( 26*40))
.byte <($a000+( 27*40))
.byte <($a000+( 28*40))
.byte <($a000+( 29*40))
.byte <($a000+( 30*40))
.byte <($a000+( 31*40))
.byte <($a000+( 32*40))
.byte <($a000+( 33*40))
.byte <($a000+( 34*40))
.byte <($a000+( 35*40))
.byte <($a000+( 36*40))
.byte <($a000+( 37*40))
.byte <($a000+( 38*40))
.byte <($a000+( 39*40))
.byte <($a000+( 40*40))
.byte <($a000+( 41*40))
.byte <($a000+( 42*40))
.byte <($a000+( 43*40))
.byte <($a000+( 44*40))
.byte <($a000+( 45*40))
.byte <($a000+( 46*40))
.byte <($a000+( 47*40))
.byte <($a000+( 48*40))
.byte <($a000+( 49*40))
.byte <($a000+( 50*40))
.byte <($a000+( 51*40))
.byte <($a000+( 52*40))
.byte <($a000+( 53*40))
.byte <($a000+( 54*40))
.byte <($a000+( 55*40))
.byte <($a000+( 56*40))
.byte <($a000+( 57*40))
.byte <($a000+( 58*40))
.byte <($a000+( 59*40))
.byte <($a000+( 60*40))
.byte <($a000+( 61*40))
.byte <($a000+( 62*40))
.byte <($a000+( 63*40))
.byte <($a000+( 64*40))
.byte <($a000+( 65*40))
.byte <($a000+( 66*40))
.byte <($a000+( 67*40))
.byte <($a000+( 68*40))
.byte <($a000+( 69*40))
.byte <($a000+( 70*40))
.byte <($a000+( 71*40))
.byte <($a000+( 72*40))
.byte <($a000+( 73*40))
.byte <($a000+( 74*40))
.byte <($a000+( 75*40))
.byte <($a000+( 76*40))
.byte <($a000+( 77*40))
.byte <($a000+( 78*40))
.byte <($a000+( 79*40))
.byte <($a000+( 80*40))
.byte <($a000+( 81*40))
.byte <($a000+( 82*40))
.byte <($a000+( 83*40))
.byte <($a000+( 84*40))
.byte <($a000+( 85*40))
.byte <($a000+( 86*40))
.byte <($a000+( 87*40))
.byte <($a000+( 88*40))
.byte <($a000+( 89*40))
.byte <($a000+( 90*40))
.byte <($a000+( 91*40))
.byte <($a000+( 92*40))
.byte <($a000+( 93*40))
.byte <($a000+( 94*40))
.byte <($a000+( 95*40))
.byte <($a000+( 96*40))
.byte <($a000+( 97*40))
.byte <($a000+( 98*40))
.byte <($a000+( 99*40))
.byte <($a000+(100*40))
.byte <($a000+(101*40))
.byte <($a000+(102*40))
.byte <($a000+(103*40))
.byte <($a000+(104*40))
.byte <($a000+(105*40))
.byte <($a000+(106*40))
.byte <($a000+(107*40))
.byte <($a000+(108*40))
.byte <($a000+(109*40))
.byte <($a000+(110*40))
.byte <($a000+(111*40))
.byte <($a000+(112*40))
.byte <($a000+(113*40))
.byte <($a000+(114*40))
.byte <($a000+(115*40))
.byte <($a000+(116*40))
.byte <($a000+(117*40))
.byte <($a000+(118*40))
.byte <($a000+(119*40))
.byte <($a000+(120*40))
.byte <($a000+(121*40))
.byte <($a000+(122*40))
.byte <($a000+(123*40))
.byte <($a000+(124*40))
.byte <($a000+(125*40))
.byte <($a000+(126*40))
.byte <($a000+(127*40))
.byte <($a000+(128*40))
.byte <($a000+(129*40))
.byte <($a000+(130*40))
.byte <($a000+(131*40))
.byte <($a000+(132*40))
.byte <($a000+(133*40))
.byte <($a000+(134*40))
.byte <($a000+(135*40))
.byte <($a000+(136*40))
.byte <($a000+(137*40))
.byte <($a000+(138*40))
.byte <($a000+(139*40))
.byte <($a000+(140*40))
.byte <($a000+(141*40))
.byte <($a000+(142*40))
.byte <($a000+(143*40))
.byte <($a000+(144*40))
.byte <($a000+(145*40))
.byte <($a000+(146*40))
.byte <($a000+(147*40))
.byte <($a000+(148*40))
.byte <($a000+(149*40))
.byte <($a000+(150*40))
.byte <($a000+(151*40))
.byte <($a000+(152*40))
.byte <($a000+(153*40))
.byte <($a000+(154*40))
.byte <($a000+(155*40))
.byte <($a000+(156*40))
.byte <($a000+(157*40))
.byte <($a000+(158*40))
.byte <($a000+(159*40))
.byte <($a000+(160*40))
.byte <($a000+(161*40))
.byte <($a000+(162*40))
.byte <($a000+(163*40))
.byte <($a000+(164*40))
.byte <($a000+(165*40))
.byte <($a000+(166*40))
.byte <($a000+(167*40))
.byte <($a000+(168*40))
.byte <($a000+(169*40))
.byte <($a000+(170*40))
.byte <($a000+(171*40))
.byte <($a000+(172*40))
.byte <($a000+(173*40))
.byte <($a000+(174*40))
.byte <($a000+(175*40))
.byte <($a000+(176*40))
.byte <($a000+(177*40))
.byte <($a000+(178*40))
.byte <($a000+(179*40))
.byte <($a000+(180*40))
.byte <($a000+(181*40))
.byte <($a000+(182*40))
.byte <($a000+(183*40))
.byte <($a000+(184*40))
.byte <($a000+(185*40))
.byte <($a000+(186*40))
.byte <($a000+(187*40))
.byte <($a000+(188*40))
.byte <($a000+(189*40))
.byte <($a000+(190*40))
.byte <($a000+(191*40))
.byte <($a000+(192*40))
.byte <($a000+(193*40))
.byte <($a000+(194*40))
.byte <($a000+(195*40))
.byte <($a000+(196*40))
.byte <($a000+(197*40))
.byte <($a000+(198*40))
.byte <($a000+(199*40))
_scrnhi:
.byte >($a000+( 0*40))
.byte >($a000+( 1*40))
.byte >($a000+( 2*40))
.byte >($a000+( 3*40))
.byte >($a000+( 4*40))
.byte >($a000+( 5*40))
.byte >($a000+( 6*40))
.byte >($a000+( 7*40))
.byte >($a000+( 8*40))
.byte >($a000+( 9*40))
.byte >($a000+( 10*40))
.byte >($a000+( 11*40))
.byte >($a000+( 12*40))
.byte >($a000+( 13*40))
.byte >($a000+( 14*40))
.byte >($a000+( 15*40))
.byte >($a000+( 16*40))
.byte >($a000+( 17*40))
.byte >($a000+( 18*40))
.byte >($a000+( 19*40))
.byte >($a000+( 20*40))
.byte >($a000+( 21*40))
.byte >($a000+( 22*40))
.byte >($a000+( 23*40))
.byte >($a000+( 24*40))
.byte >($a000+( 25*40))
.byte >($a000+( 26*40))
.byte >($a000+( 27*40))
.byte >($a000+( 28*40))
.byte >($a000+( 29*40))
.byte >($a000+( 30*40))
.byte >($a000+( 31*40))
.byte >($a000+( 32*40))
.byte >($a000+( 33*40))
.byte >($a000+( 34*40))
.byte >($a000+( 35*40))
.byte >($a000+( 36*40))
.byte >($a000+( 37*40))
.byte >($a000+( 38*40))
.byte >($a000+( 39*40))
.byte >($a000+( 40*40))
.byte >($a000+( 41*40))
.byte >($a000+( 42*40))
.byte >($a000+( 43*40))
.byte >($a000+( 44*40))
.byte >($a000+( 45*40))
.byte >($a000+( 46*40))
.byte >($a000+( 47*40))
.byte >($a000+( 48*40))
.byte >($a000+( 49*40))
.byte >($a000+( 50*40))
.byte >($a000+( 51*40))
.byte >($a000+( 52*40))
.byte >($a000+( 53*40))
.byte >($a000+( 54*40))
.byte >($a000+( 55*40))
.byte >($a000+( 56*40))
.byte >($a000+( 57*40))
.byte >($a000+( 58*40))
.byte >($a000+( 59*40))
.byte >($a000+( 60*40))
.byte >($a000+( 61*40))
.byte >($a000+( 62*40))
.byte >($a000+( 63*40))
.byte >($a000+( 64*40))
.byte >($a000+( 65*40))
.byte >($a000+( 66*40))
.byte >($a000+( 67*40))
.byte >($a000+( 68*40))
.byte >($a000+( 69*40))
.byte >($a000+( 70*40))
.byte >($a000+( 71*40))
.byte >($a000+( 72*40))
.byte >($a000+( 73*40))
.byte >($a000+( 74*40))
.byte >($a000+( 75*40))
.byte >($a000+( 76*40))
.byte >($a000+( 77*40))
.byte >($a000+( 78*40))
.byte >($a000+( 79*40))
.byte >($a000+( 80*40))
.byte >($a000+( 81*40))
.byte >($a000+( 82*40))
.byte >($a000+( 83*40))
.byte >($a000+( 84*40))
.byte >($a000+( 85*40))
.byte >($a000+( 86*40))
.byte >($a000+( 87*40))
.byte >($a000+( 88*40))
.byte >($a000+( 89*40))
.byte >($a000+( 90*40))
.byte >($a000+( 91*40))
.byte >($a000+( 92*40))
.byte >($a000+( 93*40))
.byte >($a000+( 94*40))
.byte >($a000+( 95*40))
.byte >($a000+( 96*40))
.byte >($a000+( 97*40))
.byte >($a000+( 98*40))
.byte >($a000+( 99*40))
.byte >($a000+(100*40))
.byte >($a000+(101*40))
.byte >($a000+(102*40))
.byte >($a000+(103*40))
.byte >($a000+(104*40))
.byte >($a000+(105*40))
.byte >($a000+(106*40))
.byte >($a000+(107*40))
.byte >($a000+(108*40))
.byte >($a000+(109*40))
.byte >($a000+(110*40))
.byte >($a000+(111*40))
.byte >($a000+(112*40))
.byte >($a000+(113*40))
.byte >($a000+(114*40))
.byte >($a000+(115*40))
.byte >($a000+(116*40))
.byte >($a000+(117*40))
.byte >($a000+(118*40))
.byte >($a000+(119*40))
.byte >($a000+(120*40))
.byte >($a000+(121*40))
.byte >($a000+(122*40))
.byte >($a000+(123*40))
.byte >($a000+(124*40))
.byte >($a000+(125*40))
.byte >($a000+(126*40))
.byte >($a000+(127*40))
.byte >($a000+(128*40))
.byte >($a000+(129*40))
.byte >($a000+(130*40))
.byte >($a000+(131*40))
.byte >($a000+(132*40))
.byte >($a000+(133*40))
.byte >($a000+(134*40))
.byte >($a000+(135*40))
.byte >($a000+(136*40))
.byte >($a000+(137*40))
.byte >($a000+(138*40))
.byte >($a000+(139*40))
.byte >($a000+(140*40))
.byte >($a000+(141*40))
.byte >($a000+(142*40))
.byte >($a000+(143*40))
.byte >($a000+(144*40))
.byte >($a000+(145*40))
.byte >($a000+(146*40))
.byte >($a000+(147*40))
.byte >($a000+(148*40))
.byte >($a000+(149*40))
.byte >($a000+(150*40))
.byte >($a000+(151*40))
.byte >($a000+(152*40))
.byte >($a000+(153*40))
.byte >($a000+(154*40))
.byte >($a000+(155*40))
.byte >($a000+(156*40))
.byte >($a000+(157*40))
.byte >($a000+(158*40))
.byte >($a000+(159*40))
.byte >($a000+(160*40))
.byte >($a000+(161*40))
.byte >($a000+(162*40))
.byte >($a000+(163*40))
.byte >($a000+(164*40))
.byte >($a000+(165*40))
.byte >($a000+(166*40))
.byte >($a000+(167*40))
.byte >($a000+(168*40))
.byte >($a000+(169*40))
.byte >($a000+(170*40))
.byte >($a000+(171*40))
.byte >($a000+(172*40))
.byte >($a000+(173*40))
.byte >($a000+(174*40))
.byte >($a000+(175*40))
.byte >($a000+(176*40))
.byte >($a000+(177*40))
.byte >($a000+(178*40))
.byte >($a000+(179*40))
.byte >($a000+(180*40))
.byte >($a000+(181*40))
.byte >($a000+(182*40))
.byte >($a000+(183*40))
.byte >($a000+(184*40))
.byte >($a000+(185*40))
.byte >($a000+(186*40))
.byte >($a000+(187*40))
.byte >($a000+(188*40))
.byte >($a000+(189*40))
.byte >($a000+(190*40))
.byte >($a000+(191*40))
.byte >($a000+(192*40))
.byte >($a000+(193*40))
.byte >($a000+(194*40))
.byte >($a000+(195*40))
.byte >($a000+(196*40))
.byte >($a000+(197*40))
.byte >($a000+(198*40))
.byte >($a000+(199*40))
.export _getkey
.export _hires_CharSet
.export _hires_DrawA
.export _hires_DrawCharA
.export _hires_DrawClrA
.export _hires_MaskA
.export _hires_Pieces
.export _hires_SelectA
.export _hires_clr
.export _hires_rop
.export _hires_src
.export _hires_xpos
.export _hires_xsize
.export _hires_ypos
.export _hires_ysize
.export _quit
.export _setup
.export _hires