home *** CD-ROM | disk | FTP | other *** search
- / module name st_res
- / resolution setting stuff for Mark Williams as
- /
- .shri
-
- .globl getres_
- getres_:
- link a6, $0
- /
- / RESOLUTION HANDLING ROUTINES
- /
- LINEA_I = 0xA000
- GET_REZ = 4 / extended bios resolution inquiry
- /
- / Get current resolution of screen: 0 => color
- / 25, 40, or 50 lines
- /
- /getres:
- move $GET_REZ,-(sp) / get screen resolution
- trap $14
- addq $2,sp
-
- cmpi $2,d0 / only execute if already in hi rez
- bne exgetrf
-
- move $0,d0 / clear r0
-
- .word LINEA_I / get the important pointers
-
- move -0x2A(a0),d0 / move word size to r0
- addi $1,d0 / bump to number
- bra exgetr / and exit
-
- exgetrf:
- move $0,d0 / fasle - color monitor
- exgetr:
- unlk a6
- rts
- .globl rez25_
- rez25_:
- link a6, $0
- move $GET_REZ,-(sp) / get screen resolution
- trap $14
- addq $2,sp
-
- cmpi $2,d0 / only execute if already in hi rez
- bne ex25f
-
- .word LINEA_I / get the important pointers
-
- movea.l 8(a1),a1 / a1 -> 8x16 font header (long implied)
- move.l 72(a1),-0x0A(a0) / v_off_ad <- 8x16 offset table ad
- move.l 76(a1),-0x16(a0) / v_fnt_ad <- 8x16 font data addr
-
- move $16,-0x2E(a0) / v_cel_ht <- 16 8x16 cell heigh
- move $24,-0x2A(a0) / v_cel_my <- 24 maximum cell "Y"
- move $1280,-0x28(a0) / v_cel_wr <- 1280 vertical byte offset
-
- move $1,d0 / true return
- bra ex25
- ex25f:
- move $0,d0 / false return
- ex25:
- unlk a6
- rts
- .globl rez40_
- rez40_:
- link a6, $0
- /
- / Make hi rez screen bios handle 40 lines of 8x8 characters
- /
-
- move $GET_REZ,-(sp) / get screen resolution
- trap $14
- addq $2,sp
-
- cmpi $2,d0 / only execute if already in hi rez
- bne ex40f
-
- .word LINEA_I / get the important pointers
-
- movea.l 4(a1),a1 / a1 -> 8x8 font header
- move.l 72(a1),-0x0A(a0) / v_off_ad <- 8x8 offset table ad
- move.l 76(a1),-0x16(a0) / v_fnt_ad <- 8x8 font data addr
-
- move $8,-0x2E(a0) / v_cel_ht <- 8 8x8 cell height
- move $39,-0x2A(a0) / v_cel_my <- 49 maximum cell "Y"
- / use 8x8 font in 8x10 cell, giving 10*80 for v byte offset
- move $800,-0x28(a0) / v_cel_wr <- 10*80 vertical byte offset
-
- move $1,d0 / true return
- bra ex40
- ex40f:
- move $0,d0 / false return
- ex40:
- unlk a6
- rts
- .globl rez50_
- rez50_:
- link a6, $0
-
- /
- / Make hi rez screen bios handle 50 lines of 8x8 characters
- /
- move $GET_REZ,-(sp) / get screen resolution
- trap $14
- addq $2,sp
-
- cmpi $2,d0 / only execute if already in hi rez
- bne ex50f
-
- .word LINEA_I / get the important pointers
-
- movea.l 4(a1),a1 / a1 -> 8x8 font header
- move.l 72(a1),-0x0A(a0) / v_off_ad <- 8x8 offset table ad
- move.l 76(a1),-0x16(a0) / v_fnt_ad <- 8x8 font data addr
-
- move $8,-0x2E(a0) / v_cel_ht <- 8 8x8 cell heigh
- move $49,-0x2A(a0) / v_cel_my <- 49 maximum cell "Y"
- move $640,-0x28(a0) / v_cel_wr <- 640 vertical byte offset
-
- move $1,d0 / true return
- bra ex50
- ex50f:
- move $0,d0 / false return
- ex50:
- unlk a6
- rts
- /----------------------------------
-