| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Code FAQ [11/15 |
'>>> Page 11 of Code FAQ begins here.
L$ = E$ + "*" + CHR$(5) + MKI$(576) ' set plotter mode
PUT F, , L$
FOR C = 4 TO 75
FOR Y = 0 TO 7 ' analyse 8 bits per byte
FOR R = 7 TO 0 STEP -1 ' 8 bytes to be analysed
A(R, C) = 2 * A(R, C) AND 511 ' shift 1 bit out to left
B = (B OR (A(R, C) AND 256)) \ 2 ' shift bit into B
NEXT R
L$ = CHR$(B) ' send byte to printer
PUT F, , L$
NEXT Y
NEXT C
END IF
L$ = CHR$(13) + CHR$(10) ' terminate line (stripe)
PUT F, , L$
NEXT S
L$ = E$ + "{at}" ' reset printer
PUT F, , L$
L$ = CHR$(12) ' form feed
PUT F, , L$
CLOSE F
DEF SEG
END SUB
DEFSNG A-Z
SUB LCopy11R
' Copies monochrome SCREEN 11 image to printer, with long
' axis of image along length of page.
DEFINT A-Y
DEFLNG Z
F = FREEFILE
OPEN "PRN" FOR BINARY AS F
DEF SEG = &HA000
OUT &H3CE, 4
OUT &H3CF, 0
E$ = CHR$(27) ' ESC character
P$ = STRING$(48, 0) ' centring string of nulls
L$ = E$ + "A" + CHR$(8) ' set printer to 8/72 lpi
PUT F, , L$
FOR C = 0 TO 79 ' 80 image columns = printer lines
N = -1 ' null-line flag
S$ = "" ' initialize line
FOR Z = 38320 + C TO C STEP -80 ' 480 bytes per column
B = PEEK(Z)
IF N THEN IF B THEN N = 0
S$ = S$ + CHR$(B)
NEXT
IF NOT N THEN ' not null line
L$ = E$ + "*" + CHR$(5) + MKI$(576) + P$ + S$ + P$
' set plotter mode, centre image, image line, fill line
PUT F, , L$
END IF
L$ = CHR$(13) + CHR$(10) ' terminate line
PUT F, , L$
NEXT C
L$ = E$ + "{at}" ' reset printer
PUT F, , L$
L$ = CHR$(12) ' form feed
PUT F, , L$
CLOSE F
'>>> Page 11 of Code FAQ ends here. Continued in next message.
* Brought to you by Greg's Little QBasic Auto-Poster *
--- Maximus 3.01
* Origin: The BandMaster, Vancouver, B.C., Canada (1:153/7715)SEEN-BY: 633/267 270 @PATH: 153/7715 140/1 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
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™.