Download Application interface specification for IBM 4610

Transcript
WRITE #CRPTR%; SCALE$ + CHR$(67H)
CALL PRINT.Multiple.Lines.on.Printer(1)
WRITE #CRPTR%; SCALE$ + CHR$(00H)
! upside down printing
WRITE #CRPTR%; UPSIDE$ + CHR$(01H)
CALL PRINT.Multiple.Lines.on.Printer(1)
WRITE #CRPTR%; SCALE$ + CHR$(66H)
CALL PRINT.Multiple.Lines.on.Printer(1)
WRITE #CRPTR%; SCALE$ + CHR$(77H)
CALL PRINT.Multiple.Lines.on.Printer(1)
WRITE #CRPTR%; UPSIDE$ + CHR$(00H)
CALL PRINT.Multiple.Lines.on.Printer(1)
! return to normal scale
WRITE #CRPTR%; SCALE$ + CHR$(00H)
CALL PRINT.Multiple.Lines.on.Printer(10)
Honor station mode examples
When using honor station mode, the application is not allowed to imbed a command
in the printer data to switch printer stations. The application must use the correct
printer session number to choose the printer station. Most of the examples in
“Stream mode examples” on page 101 are also applicable to honor station mode.
The examples that are not valid are:
v Assigning commands to string variables
v Printing to the CR: station with various fonts
v Printing multiple lines to the CR: station in a single WRITE statement
v Printing to the CR: varying the characters per inch
Note: In the following examples, PDI is the DI: session and PCR is the CR:
session.
Setting honor station mode
This example shows using the PUTLONG command to set the honor station mode.
See “PUTLONG statement” on page 38 for the format of the PUTLONG command.
!
! Set honor station mode using PUTLONG
!
! Buffer sizing command is ’M’ = 57H, PCMD is INTEGER*4
! The high order byte of the command indicates that
! IBM 4610 printer commands are in use
!
! The second byte (57H) is the buffer size command
!
! The low order bytes are the option, set to 0001H to select
! honor station mode
PCMD = 80570001H
! issue the command (either session can be used)
PUTLONG PCR, PCMD
Setting the landscape model when using honor station mode
This example shows using the PUTLONG command to set landscape DI: printing
when using the honor station mode. See “PUTLONG statement” on page 38 for the
format of the PUTLONG command.
Chapter 7. CBASIC programming examples
111