| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | SCREEN 13 |
Hi everyone, how are you
Does any one know a solution how to port QB programs that use SCREEN 12/13
to PB 3.2 ? Here are the differences:
Screen 12 in QB 4.5
- 640 x 480 graphics
- 80 x 30 or 80 x 60 text format, character box size of 8 x 16 or 8 x 8
- Assignment of up to 256K colors to 16 attributes
- VGA required ^^^
PB 3.2 allows 16 colors out of a palette of 64
Screen 13 in QB 4.5
- 320 x 200 graphics
- 40 x 25 text format, character box size of 8 x 8
- Assignment of up to 256K colors to up to 256 attributes
PB 3.2 doesn't have an equivalent for SCREEN 13
Any work around known for this problem? Especially 'SCREEN 13' supported
by (1988) QB 4.5, I can't imagine (1995) PB 3.2 doesn't support it... ;-)
Greetings,
Joop Blokker
Amsterdam, Sunday, 3 September 1995 - 11:30
.!. Too Many Programmers In This Area. Please, ZIP Yourself...
--- Terminate 3.00/Pro*at
# Origin: BBS De Lauwers, Munnekezijl, Holland, Europe. (88:950/301.2)
# Origin: BasicNet MailGate to -> United Bbs Systems (119:119/88.0)
---------------
** A related thread FOLLOWS this message.
FIDO MESSAGE AREA==> TOPIC: 214 POWER BASIC Ref: CDDJ3215 Date: 09/09/95
From: KURT KUZBA Time: 03:53pm
\/To: JOOP BLOKKER (Read 3 times)
Subj: R: SCREEN 13
JB> Screen 13 in QB 4.5
JB> - 320 x 200 graphics
JB> - 40 x 25 text format, character box size of 8 x 8
JB> - Assignment of up to 256K colors to up to 256 attributes
JB> PB 3.2 doesn't have an equivalent for SCREEN 13
JB> Any work around known for this problem?
JB> Especially 'SCREEN 13' supported by (1988) QB 4.5,
JB> I can't imagine (1995) PB 3.2 doesn't support it... ;-) Greetings,
jb>...................................................................
Me neither, but it doesn't. At least not directly. You can still
get into it via ASM, and you can write via the BIOS routines, or make
your own fonts. Here is a line drawing program in 13H.
'''''...........LINEDEM0.BAS..........................................*
'''''....This program demonstrates the use of PowerBASIC to draw......*
'''''....lines in mode 13h. The line routines are fairly quick........*
'''''....Released to the PUBLIC DOMAIN by Kurt Kuzba.............*
DECLARE SUB mode13()
DECLARE SUB textmode()
RANDOMIZE (TIMER): DEF SEG = &HA000
'''''....The array makes putting the pixels in place much faster......*
DIM Xrow(0 TO 199) AS LONG
Xrow(0) = 0: FOR t% = 1 TO 199: Xrow(t%) = 320 + Xrow(t% - 1): NEXT
LOCATE 10, 16: COLOR 4, 0: PRINT STRING$(51, CHR$(220))
LOCATE , 16: COLOR 15, 4
PRINT " Press any key to begin. And then any key to exit "
LOCATE , 16: COLOR 4, 0: PRINT STRING$(51, CHR$(223))
p$ = "": WHILE p$ = "": p$ = INKEY$: WEND
mode13: xd1% = 4: xd2% = 2: yd1% = 1: yd2% = 3: hue% = 33
xp1% = 0: xp2% = 0: yp1% = 0: yp2% = 0: ch% = 0
WHILE p$ CHR$(27)
p$ = INKEY$
IF (yp1% + yd1%) < 0 THEN yd1% = (RND * 2 + 2)
IF (yp1% + yd1%) > 319 THEN yd1% = -(RND * 2 + 2)
IF (yp2% + yd2%) < 0 THEN yd2% = (RND * 2 + 2)
IF (yp2% + yd2%) > 319 THEN yd2% = -(RND * 2 + 2)
IF (xp1% + xd1%) < 0 THEN xd1% = (RND * 2 + 2)
IF (xp1% + xd1%) > 199 THEN xd1% = -(RND * 2 + 2)
IF (xp2% + xd2%) < 0 THEN xd2% = (RND * 2 + 2)
IF (xp2% + xd2%) > 199 THEN xd2% = -(RND * 2 + 2)
xp1% = xp1% + xd1%: xp2% = xp2% + xd2%
yp1% = yp1% + yd1%: yp2% = yp2% + yd2%
x1% = xp1%: x2% = xp2%: y1% = yp1%: y2% = yp2%
ch% = (ch% + 1) AND 1023: if ch% = 0 then hue% = rnd * 240 + 1
GOSUB line13: IF p$ "" THEN p$ = CHR$(27)
WEND: textmode: END
'''''....This is the line drawing routine.............................*
line13:
inx% = (x1% > x2%) - (x1% y2%) - (y1% <= y2%)
rs& = ABS(x1% - x2%): rn& = ABS(y1% - y2%)
lng& = rs& * -(rs& > rn&) - rn& * (rn& >= rs&)
IF lng& = 0 THEN lng& = 1
rs& = ((rs& * 512 + 511) / lng&): rn& = ((rn& * 512 + 511) / lng&)
cx& = 0: cy& = 0: d$ = "!"
WHILE d$ = "!"
POKE Xrow(x1%) + y1%, hue%
IF (x1% = x2% AND y1% = y2%) THEN d$ = "done"
IF x1% x2% THEN cx& = cx& + rs&
IF y1% y2% THEN cy& = cy& + rn&
IF cx& > 511 THEN x1% = x1% + inx%: cx& = cx& - 512
IF cy& > 511 THEN y1% = y1% + iny%: cy& = cy& - 512
WEND: RETURN
SUB mode13()
! mov ah, &H00
! mov al, &H13
! int &H10
END SUB
SUB textmode()
! mov ah, &H00
! mov al, &H03
! int &H10
END SUB
'''''...........LINEDEM0.BAS..........................................*
---
> ] * Origin: United Bbs Systems Europe MailGate to -> Fido USA (2:283/529.0)* Origin: >BBS HIGHLANDER - +49-5874-1656 - 2:240/6120@fidonet (2:240/6120) |
|
| SOURCE: echomail via exec-pc | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.