Tasman Interface Software

Date: 1983
Type: Program
Platform(s): TS 2068

BASIC program to configure your TASMAN printer interface. It loads 652 bytes of interface software at 64716 (the top of a 48K machine), then walks you through setting the carriage-return and linefeed codes your printer needs, whether it wraps long lines by itself (and if not, how many characters a line holds), the code sent for each character, the codes for the sixteen block graphics characters, and the codes for the user-defined graphics. It then asks whether you have a type B or type C interface and pokes the matching port into the code.

When it is done it tells you to use RANDOMIZE USR 64716 for a text screen copy and RANDOMIZE USR 64719 to set up the port for LLIST and LPRINT, and offers to save the customised code to tape and verify it. The header reads “Tasman Interface Software (48K), © Tasman Software 1983 Issue B”, and the cassette label reads “Copyright Tasman Software 1983, Timex Sinclair 2068”.

Program Analysis

  • Line 20 clears to 64715 and loads the code; line 15 lets you re-run the setup on code already in memory.
  • The settings are POKEs into a table in the code: CR at base+7, LF at base+8, the character table from base+10, UDG codes from base+106, four codes for each graphics character from base+127 and line length at base+191.
  • Line 9080 POKEs 64947 with 191 for a type B interface or 251 for a type C, which sets the port number the code uses.
  • POKE 23617,2 at line 425 puts the input line into graphics mode so you can type a UDG character.

Potential Issues

  • Lines 66 and 80 check only the first character of a number you type, so an entry such as 1x gives an error at VAL.
  • Line 9040 reads INKEY$ twice, so a quick key press can be missed and need pressing again.

What’s in the download

  • A TZX and a WAV of the tape, and a photograph of the cassette.
  • Besides tasintbas and tasintcode, the tape holds eight 256-byte code files for the printer buffer at 23296, named tasmini, tasepson, tas-star, tastandy, tas-seik, tasbuff, tas-starg and tas-shinwa. The BASIC program does not load them; from their names they appear to be routines for particular printers.

Related Products

Available in Centronics and RS-232 versions. Supplied with 3′ cable and driver software.

Image Gallery

Source Code

   10 REM Tasman Interface Software
   12 REM RESET  Tasman Software 1983
   15 LET base=64716: LET len=652: GO TO 50
   20 CLEAR 64715: GO SUB 4000: PRINT FLASH 1;AT 10,4;"Do NOT stop the tape";AT 11,4;"until the bytes have";AT 12,11;"loaded."
   30 LET base=64716: LET len=652
   40 LOAD ""CODE base: CLS 
   50 GO SUB 4000: PRINT : PRINT "This Basic program allows you toconfigure the Tasman interface  software to suit your printer   and your requirements.": PRINT 
   52 PRINT "Just press ENTER for the defaultvalues given in brackets.": PRINT 
   54 LET c=1: GO SUB 3000
   56 INPUT a$: IF a$="" THEN LET a$="2"
   58 IF a$<>"1" AND a$<>"2" THEN GO TO 56
   62 LET c=0: GO SUB 3000: PRINT AT 13,14; INVERSE 1;a$
   64 IF a$="1" THEN GO TO 85
   65 LET c=1: GO SUB 3010: INPUT a$: IF a$="" THEN LET a$=STR$ (PEEK (base+7))
   66 LET c=0: GO SUB 3010: IF CODE a$>57 THEN GO TO 65
   70 PRINT INVERSE 1;a$: POKE (base+7),VAL a$
   72 LET c=1: GO SUB 3020: INPUT a$
   75 IF a$="" THEN LET a$=STR$ (PEEK (base+8))
   80 LET c=0: GO SUB 3020: IF CODE a$>57 THEN GO TO 72
   82 PRINT INVERSE 1;a$: POKE (base+8),VAL a$: GO TO 94
   85 LET c=1: GO SUB 3030: INPUT a$
   90 IF a$="" THEN LET a$=STR$ (PEEK (base+7))
   92 PRINT INVERSE 1;a$: LET c=0: GO SUB 3030: POKE (base+7),VAL a$: POKE (base+8),0
   94 LET c=1: GO SUB 3040: IF INKEY$<>"" THEN GO TO 94
   95 LET a$=INKEY$: IF CODE a$=13 OR a$="y" OR a$="Y" THEN PRINT "Y";: GO TO 98
   96 IF a$="n" OR a$="N" THEN PRINT "N": LET c=0: GO SUB 3040: GO SUB 700: GO TO 99
   97 GO TO 95
   98 LET c=0: GO SUB 3040: PRINT 
   99 PRINT : PRINT : PRINT : PRINT : GO SUB 4000
  100 PRINT AT 19,0; BRIGHT 1;"Do you wish to specify charactercodes for printing?  :Y/N: ";
  110 LET a$=INKEY$: IF a$="y" OR a$="Y" THEN GO TO 200
  120 IF a$="n" OR a$="N" THEN GO TO 500
  130 GO TO 110
  200 CLS : GO SUB 4000: PRINT "Character codes for prnter:"
  210 FOR i=0 TO 5: FOR j=0 TO 15: PRINT AT j+4,i*5;CHR$ (32+j+i*16); INVERSE 1;PEEK (base+10+j+i*16): NEXT j: NEXT i
  220 INPUT "Character whose output code to  change?(ENTER if finished)";a$
  230 IF a$="" THEN GO TO 400
  240 IF LEN a$>1 THEN GO TO 220
  250 PRINT AT 2 TO DRAW ,14; FLASH 1;a$;AT 0,0;: INPUT "Numerical code to be output on  printing?";b
  260 POKE (base+10+CODE a$-32),b: GO TO 200
  300 CLS : GO SUB 4000: PRINT "Printer control graphics chars:"
  305 LET b=4: FOR i=0 TO 15: LET b=ABS (b-4): PRINT AT i+4,b;i+128;CHR$ (i+128)
  307 FOR j=0 TO 3: LET c=PEEK (base+127+i*4+j): LET a$=STR$ c: IF c=255 THEN LET a$=""
  308 PRINT AT i+4,10+4*j;a$: NEXT j: NEXT i
  320 INPUT "Type graphics character code 128-143 (ENTER if finished)";a$
  325 IF a$="" THEN GO TO 500
  340 LET b=VAL a$: IF b<128 OR b>143 THEN GO TO 320
  350 LET b=b-128: PRINT AT 21,3; FLASH 1;b+128; FLASH 0;" ";CHR$ (b+128)
  355 FOR j=0 TO 3: POKE (base+127+b*4+j),255: NEXT j
  360 FOR j=0 TO 3: INPUT "Code? (ENTER if finished)";a$: IF a$="" THEN GO TO 300
  370 POKE (base+127+b*4+j),VAL a$: PRINT AT 21,10+4*j;VAL a$: NEXT j: GO TO 300
  400 CLS : GO SUB 4000: PRINT : PRINT "User defined graphics - codes tobe sent to printer:"
  410 FOR i=0 TO 10: PRINT AT i+6,6;CHR$ (i+144);" "; INVERSE 1;PEEK (base+106+i): NEXT i
  420 FOR i=0 TO 9: PRINT AT i+6,20;CHR$ (i+155);" "; INVERSE 1;PEEK (base+117+i): NEXT i
  425 POKE 23617,2
  430 INPUT "Character whose output code to  change? (ENTER if finished)";a$
  435 POKE 23617,0
  440 IF a$="" THEN GO TO 300
  450 LET i=CODE a$: IF i<144 OR i>164 THEN GO TO 425
  460 PRINT AT 20,14; FLASH 1;a$;AT 0,0;: INPUT "Numerical code to be output on  printing?";b
  470 POKE (base+106+CODE a$-144),b: GO TO 400
  500 RANDOMIZE USR (base+3): CLS 
  502 GO SUB 4000: PRINT : PRINT "The interface software is now   configured. It occupies"
  505 PRINT "locations ";base;" to ";base+len-1;"."
  510 PRINT : PRINT "To initialise the printer port  to accept LLIST and LPRINT      execute "; BRIGHT 1;"RANDOMIZE USR ";base+3
  520 PRINT : PRINT "For a screen COPY (text only)": PRINT "execute "; BRIGHT 1;"RANDOMIZE USR ";base
  530 PRINT : PRINT "Press R to restart (RUN again)."
  540 PRINT : PRINT "      B to enter Basic."
  550 PRINT : PRINT "      S to save your customised         printer software."
  560 LET a$=INKEY$: IF a$="b" OR a$="B" THEN PRINT AT 16,6; BRIGHT 1;"B": STOP 
  570 IF a$="r" OR a$="R" THEN RUN 
  580 IF a$="s" OR a$="S" THEN GO TO 600
  590 GO TO 560
  600 PRINT : PRINT "Remove earplug from recorder.";AT 18,6; BRIGHT 1;"S": SAVE "tasintcode"CODE base,len
  610 CLS : GO SUB 4000: PRINT : PRINT "Rewind tape, reconnect earplug, and play tape to verify printer software."
  620 PRINT : PRINT "If verification fails execute   GOTO 500 to try again."
  630 VERIFY "tasintcode"CODE 
  640 PRINT AT 21,4; BRIGHT 1;"verification successful": GO TO 502
  700 PRINT : PRINT : PRINT : PRINT : PRINT : LET c=1: GO SUB 3050: INPUT a: POKE (base+191),a: PRINT AT 20,26; INVERSE 1;a: LET c=0: GO SUB 3050: PRINT : PRINT : PRINT : PRINT : GO SUB 4000: RETURN 
 2999 STOP 
 3000 PRINT AT 11,0; BRIGHT c;"Does your printer use 1 or 2    codes for carriage return and   linefeed? (2)": RETURN 
 3010 PRINT AT 15,0; BRIGHT c;"Code for carriage return?("; INVERSE 1;PEEK (base+7); INVERSE 0;") ";: RETURN 
 3020 PRINT AT 17,0; BRIGHT c;"Code for linefeed? ("; INVERSE 1;PEEK (base+8); INVERSE 0;") ";: RETURN 
 3030 PRINT AT 15,0; BRIGHT c;"Code for carriage return and    linefeed? ("; INVERSE 1;PEEK (base+7); INVERSE 0;") ";: RETURN 
 3040 PRINT AT 19,0; BRIGHT c;"Does your printer do a carriage return / linefeed if printing   beyond the end of a line? (Y) ";: RETURN 
 3050 PRINT AT 19,0; BRIGHT c;"How many characters per line    does your printer have?": RETURN 
 4000 FOR i=0 TO 2: PRINT AT i,0;"                                ";: NEXT i
 4010 PRINT AT 0,0;"Tasman Interface Software (48K)";AT 1,0;"* Tasman Software 1983  Issue B": RETURN 
 8000 SAVE "tasintbas" LINE 20: SAVE "tasintcode"CODE base,len: VERIFY "": VERIFY ""CODE

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.