29.12.2012 Views

The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...

The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...

The Programmer's Guide to TRSDOS Version 6 - Tim Mann's Home ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

8.16 DMP-500 BOLDFACE Filter Illustrated<br />

;BOLDFACE/ASM - FILTER <strong>to</strong> invoke boldfacing on DMP-500 - 03/20/83<br />

TITLE ''<br />

;*****<br />

; This filter uses two trigger <strong>to</strong>ggle characters <strong>to</strong> turn<br />

; on and off the boldface mode of the DMP-500 printer.<br />

; One character called TOGGLE (defaults <strong>to</strong> tilde) will<br />

; <strong>to</strong>ggle on/off boldface and output a space in lieu of<br />

; the <strong>to</strong>ggle character. This is useful <strong>to</strong> maintain right<br />

; justification. <strong>The</strong> other character called NULL (defaults<br />

; <strong>to</strong> DELETE, X'7F') <strong>to</strong>ggles the boldface mode but causes<br />

; no character <strong>to</strong> be sent in lieu of the <strong>to</strong>ggle character.<br />

; <strong>The</strong> boldface mode is au<strong>to</strong>matically turned off when a<br />

; carriage return (X'0D') is sensed.<br />

;*=*=*<br />

COM ''<br />

;*=*=*<br />

LF EQU 10<br />

CR EQU 13<br />

ESCAPE EQU 27<br />

BOLDON EQU 31<br />

BOLDOFF EQU 32<br />

@CHNIO EQU 20<br />

@HIGH$ EQU 100<br />

@DSPLY EQU 10<br />

@FLAGS$ EQU 101<br />

@PARAM EQU 17<br />

@LOGOT EQU 12<br />

;<br />

ORG 3000H<br />

BEGIN PUSH DE<br />

POP IX ;Get DCB in<strong>to</strong> IX<br />

LD (MODDCB),DE ;Stuff DCB pointer<br />

PUSH HL ;Save INBUF$ pointer<br />

LD HL,HELLO$<br />

LD A,@DSPLY<br />

RST 40<br />

POP HL ;Rcvr INBUF$ pointer<br />

;*=*=*<br />

; Check if entry from SET command<br />

;*=*=*<br />

LD A,@FLAGS$ ;Get flags pointer in<strong>to</strong> IY<br />

RST 40<br />

BIT 3,(IY+'C'-'A') ;System request?<br />

JP Z,VIASET<br />

;<br />

LD DE,PRMTBL$ ;Grab any user parms<br />

LD A,@PARAM<br />

RST 40<br />

JP NZ,PRMERR<br />

;*=*=*<br />

; Transfer requested TOGGLE e/w space <strong>to</strong> filter<br />

;*=*=*<br />

LD A,(TRESP) ;Ck if any entry<br />

LD B,A<br />

TOGGLE LD HL,7EH ;Set default <strong>to</strong> TILDE<br />

LD A,(HL) ;P/u assumed string<br />

BIT 5,B ;String entry?<br />

JR NZ,TSTUF<br />

LD A,L ;P/u hex or dec entry<br />

BIT 6,B ;Error if switch entry<br />

JP NZ,PRMERR<br />

TSTUF LD (TILDE1+1),A ;Stuff it in there<br />

LD (TILDE2+1),A<br />

;*=*=*<br />

; Transfer requested <strong>to</strong>ggle w/o space <strong>to</strong> filter<br />

;*=*=*<br />

LD A,(NRESP) ;Ck if any entry<br />

LD B,A<br />

NULL LD HL,7FH ;Set default <strong>to</strong> DELETE<br />

LD A,(HL) ;P/u assumed string<br />

BIT 5,B ;String entry?<br />

JR NZ,NSTUF<br />

8-40

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!