Category : BASIC Source Code
Archive   : QBFAQR01.ZIP
Filename : PCXREAD.BAS

 
Output of file : PCXREAD.BAS contained in archive : QBFAQR01.ZIP
'From: BRENT ASHLEY
'Subj: PICTURES WITH QBASIC
'---------------------------------------------------------------------------
'Here's a PCX loader I found and played with some time ago. There are no
'comments and I'm not sure about converting to other screen modes, but
'it's a start and you're welcome to it. For speed, you'll want to either
'modify this to write to an invisible page and then make the page visible
'(apparent speed), or find a library with PCX routines (some of Tom
'Hanlin's have them) written in assembler.

DEFINT A-Z
DECLARE SUB PCXLOAD (File$)

CLS
PCXLOAD "MyFile.PCX"
WHILE INKEY$ = "": WEND

SUB PCXLOAD (File$) STATIC
SCREEN 11, , 0
OPEN File$ FOR INPUT AS #1 LEN = 16384
SEEK #1, 129
DEF SEG = &HA000
FOR ScrLin = 0 TO 479
Addr& = 80& * ScrLin
LinStrt& = Addr&: LinEnd& = Addr& + 80
Plane = 1
OUT &H3C4, 2: OUT &H3C5, Plane
DO WHILE Plane <= 8
Byte = ASC(INPUT$(1, 1))
IF EOF(1) THEN EXIT FOR
IF (Byte AND 192) <> 192 THEN
POKE Addr&, Byte
Addr& = Addr& + 1
IF Addr& >= LinEnd& THEN
Addr& = LinStrt&
Plane = Plane * 2
OUT &H3C4, 2: OUT &H3C5, Plane
END IF
ELSE
Byte = Byte AND 63
Byte2 = ASC(INPUT$(1, 1))
IF EOF(1) THEN EXIT FOR
FOR Expand = 1 TO Byte
POKE Addr&, Byte2
Addr& = Addr& + 1
IF Addr& >= LinEnd& THEN
Addr& = LinStrt&
Plane = Plane * 2
OUT &H3C4, 2: OUT &H3C5, Plane
END IF
NEXT
END IF
LOOP
NEXT
OUT &H3C4, 2: OUT &H3C5, &HF
DEF SEG
CLOSE #1
END SUB

' end of program


  3 Responses to “Category : BASIC Source Code
Archive   : QBFAQR01.ZIP
Filename : PCXREAD.BAS

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/