Page Length
Character Counter
Line Counter
Current Cmd. Char.
Text Flags
Text Flag Bit Representations: (Bit 7 — Output high order bit)
(Bit 6 — Video turned on)
(Bits
S6F8
+ $0N
S4F8
$0N
S6F8
+
$0N
$778
+ $0N
S7F8
+ $0N
APPENDIX A
USING GRAPPLERTM COMMANDS WITHIN A PROGRAM
The following table illustrates how a few Grappler
commanrds V70uld be used within a program:
INTERGER BASIC
APPLESOFT
DESCRIPTION
LF after a CR)
(Bit 4 — Bell on)
CUSTOM DRIVERS
If you are writing your own drivers, the following
locations are used to access the card (Y = NO where
N = Slot#):
Printer Status — SC®8t,Y (READ)
Output Latch - SCOSBt.Y (WRITE)
Strobe Low - $C(Zi82,Y (WRITE)
Strobe High - $0284,Y (WRITE)
The following routine gives an example of how to
output a character using these locations:
1(2 PRINT
''CTRL-D";"PR#1'
1(2 PRINT
CHR$(4);''PR#V
2(2 PRINT
•'CTRL-I";''8(2N''
3(2 PRINT
"TESTING"
4(2 POKE
36,5l2:PRINT''TESTING"
50 PRINT
20 PRINT
CHR$(9);''80N"
30 PRINT
"TESTING"
40 POKE
36,50:PRINT"TESTING"
50 PRINT
PHA SAVE OUTPUT CHARACTER ON STACK
"CTRL-I";"CTRL-A" CHRS(9);CHR$(1)
LDY
10
SET UP Y-REGISTER FOR SLOT #1
PAPER?
LDA
SC081 ,Y CHECK STATUS FOR PAPER
AND 04
CHECK BIT 2
BNE
PAPER? IF SET THEN NO PAPER. RECHECK
60 PRINT
60 PRINT
SECT? LDA
SC081 ,Y CHECK STATUS FOR PRINTER SELECT
"CTRL-A";"10L"
"CHRS(1);"10L"
AND
02 CHECK BIT 1
BEQ SECT?
IF ZERO THEN NOT SELECTED
BUSY?
LDA $C08 1Y
CHECK STATUS FOR PRINTER BUSY
AND
08
CHECK BIT 3
70 PRINT
BNE
BUSY?
IF SET THEN PRINTER IS BUSY
70 PRINT
OUTPUT?
PLA RESET OUTPUT CHARACTER
"THE GRAPPLER"
"THE GRAPPLER"
STA
SC081 ,Y
STORE TO OUTPUT LATCH
(.
STA
$C082,Y
PULL STROBE LINE LOW
STA $C084,Y
RESET STROBE LINE HIGH
80 PRINT
RTS
RETURN FROM SUBROUTINE
80 PRINT
“CTRL-D";"PR#0" CHR$(4);"PR#0"
Turns on
Grappler’^'^. If
you are nof
using DOS (disk
operating
system) then
enter the line ,
as: 10 PR#1
Set line length to
80 columns and
turn off Apple
video.
Prints "Testing"
on the printer.
Tabs to the 51st
column and
prints "Testing".
Charges the
CTRL-1
command
character to
CTRL-A
Sets left margin
to 10, notice use
of new
command
character,
CTRL-A
Prints "The
Grappler".
Notice printing
starts at 10th
column.
Turns off
Grappler. if you
are not using
DOS enter the
line as: 80 PR#0
NOTES;
Whenever you see CTRL-i enter the command, control I, as explained
in the section "Text Features," For example, since control characters
don't appear on the screen, line 10 will look like this; 10 PRINT " ", 'PR» i".
When tabbing past 40 columns, you must set the line length greater
than 40 (CTRL-InN) and then use tne POKE 36,n command shown odovg
Comments to this Manuals