HomeXBIOSDate, Time and TimerDSP programming

4.10 Printer functions

Prtblk Hardcopy function with parameter block.
Scrdmp Prints screen contents.
Setprt Gets or alters printer settings.

See also: Screen functions   GDOS drivers

4.10.1 Prtblk

Name: »Print screen dump« - Hardcopy print-out
Opcode: 36
Syntax: void Prtblk( PBDEF *par );
Description: The XBIOS routine Prtblk prints out a given segment of the memory. The pointer par serves to describe the structure of the screen build-up.

The print process can be terminated with the key combination Alternate/Help.

Note: Before calling this function the system variable prt_cnt should be set to 1 to make anything at all happen. After return of the function the variable should be set back to -1.

Warning: As of MagiC 3, this function is only present as a dummy routine; possibly the desired functionality may be restored by an external program.
Return value: The function returns 0 if the printout was successful, otherwise a non-zero value.
Availability: All TOS versions.
Gruppe: Printer functions
See also: Binding   HARDCOPY   MagiC

4.10.1.1 Bindings for Prtblk

C: #include

void Prtblk( PBDEF *par );
Assembler:
pea       par          ; Offset 2
move.w    #36,-(sp)    ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #6,sp        ; Correct stack

4.10.2 Scrdmp

Name: »Screen dump« - Print out the screen contents.
Opcode: 20
Syntax: void Scrdmp( void );
Description: The XBIOS routine Scrdmp prints out the contents of the screen as hardcopy.

The print process can be terminated with the key combination Alternate/Help.

Note: The function jumps via the scr_dump system vector, and unfortunately does not work with all available printers.

Warning: As of MagiC 3, this function is only present as a dummy routine; possibly the desired functionality may be restored by an external program.
Return value: The function does not return a result.
Availability: All TOS versions.
Group: Printer functions
See also: Binding   HARDCOPY   MagiC

4.10.2.1 Bindings for Scrdmp

C: #include

void Scrdmp( void );
Assembler:
move.w    #20,-(sp)    ; Offset 0
trap      #14          ; Call XBIOS
addq.l    #2,sp        ; Correct stack

4.10.3 Setprt

Name: »Setprinter« - Initialize the printer.
Opcode: 33
Syntax: int16_t Setprt( int16_t config );
Description: The XBIOS routine Setprt sets or reads the current settings of the printer. The following bits can be specified in the parameter config:

Bit Meaning
0 Dot-matrix or daisywheel printer
1 Monochrome or colour
2 Epson, or Atari printer
3 NLQ or Draft print.
4 Centronics or RS-232 port.
5 Continuous paper or single sheet.


With config = -1 the current configuration will be returned. All further bits are reserved for future use.

Note: Unfortunately, the settings made by this function will be ignored by almost all parts of the operating system. So in one's own programs one ought to evaluate at least the choice of port as well as the type of paper.
Return value: The function returns the old configuration.
Availability: All TOS versions.
Group: Printer functions
See also: Binding

4.10.3.1 Bindings for Setprt

C: #include

int16_t Setprt( int16_t config );
Assembler:
move.w    config,-(sp)  ; Offset 2
move.w    #33,-(sp)     ; Offset 0
trap      #14           ; Call XBIOS
addq.l    #4,sp         ; Correct stack

HomeXBIOSDate, Time and TimerDSP programming