home *** CD-ROM | disk | FTP | other *** search
- ; forty.asm
- ;------------------------
- ; Set 40 column RGB mode
- ;------------------------
-
- star = $0b00
- .wor star
- * = star
-
- colums = $00ee
- int0e = $170e
- chrout = $ffd2
- primm = $ff7d
-
- jmp forty
- dw Date
-
- forty ldx #25 ; set pixels to double width
- jsr readrg
- ora #16
- sta vdc2
- ldy #0
- for0 cpy #16
- beq for1
- lda vdctab,y
- iny
- ldx vdctab,y
- iny
- jsr writrg
- jmp for0
-
- for1 lda #79
- sta colums
- lda #147
- jsr chrout
- lda #39
- sta colums
- jsr primm
- .asc 19,19,147,0
- jmp int0e
-
- ;-------------------------------------
- ;Table of VDC value,register to change
- ;-------------------------------------
-
- vdctab .byt $3f, 0 ; total screen width in chars
- .byt 40, 1 ; 40 displayable chars per row
- .byt $37, 2 ; horizontal sync
- .byt $57, 25 ; mode control
- .byt $89, 22 ; character horizontal size control
- .byt 40, 27 ; 40 bytes of ram per row of chars
- .byt $35, 2 ; horizontal sync
- vdc2 .byt 0, 25 ; mode control
-
- ;----------------------------------
- ; Subroutine: read VDC register .x
- ;----------------------------------
-
- readrg stx $d600
- rd bit $d600
- bpl rd
- lda $d601
- rts
-
- ;----------------------------------
- ; Subroutine: write VDC register .x
- ;----------------------------------
-
- writrg stx $d600
- wr bit $d600
- bpl wr
- sta $d601
- rts
-
- .end
-