; This module has been considerably modified, and documented so that it ; can be easily adapted to the various device number and secondary address ; combinations that exist. Use of theis module assumes that you interface ; will do any needed character conversion with your interface as it sends ; _ascii_, NOT petascii. the buffer has been to all intents defeated, but ; still exists as 1 char in length as attempts to send data as a single ; char at a time (supposedly suported by FAST8502) did not work. Also the ; redundant call to do$convt and print is left because the driver doesnt ; seem to work without it (let me know why if you figure it out). ; This module will not change any characters sent to the printer and will ; send all characters (not like the 6 DEC 85 system that seemed to always ; leave a form-feed lurking in the buffer for an unwary user) ; ; User assumes _All_ liability for the use of this module. Original ; copyright is maintained by Commodore where aplicable, all changes ; copyright april 26 1987 by James W. Waltrip IV ; title 'CXPRINTER Commodore printer drivers 26 April 87' maclib z80 maclib cxequ public ?PT$I$1101,?PT$O$1,?pt$o$2 extrn ?fun65 ; ; printer output in register C ; dseg ?pt$o$2: lxi h,print call do$convt ; C must be unchanged A=desired code lxi h,prt$buf$2 mov a,c ; char to print mvi b,5 ; device number of printer mvi c,4 ; secondary address ; jr prt$cont do$convt: pchl ; HL,DE and B may be used ; ?pt$o$1: lxi h,print call do$convt lxi h,prt$buf$1 mov a,c ; char to print mvi b,4 ;device number of printer mvi c,4 ; secondary address ; ^------must be four for cardco LQ/3 prt$cont: mov m,a mvi a,1 sta vic$count ; set number of bytes to send shld @buffer ; save location to print from mov a,b sta vic$drv ; pass device # in Vic$drv mov a,c sta vic$trk ; pass secondary adr in Vic$trk mvi a,vic$prt jmp ?fun65 ; print: ?pt$i$1101: ret dseg prt$buf$lng equ 1 prt$buf$1: ds prt$buf$lng prt$buf$2: ds prt$buf$lng