Short Utilities/Routines for TS 2068

Authors

Publication

Pub Details

Date

Pages

See all articles from The RAMTOP Dec 1985

Our Friend Eric Yruegas sent this to me. THANKS! ERIC!

This month I was rattin’ around my program files and found a few programs that I haven’t used in a while. I thought that I’d share them with you.

Bold Characters

The first is a short machine code routine that makes bold characters on the screen. If you call the routine repeatedly, the character set becomes thicker each time. To access the bold characters, use POKE 23607,250. To restore the regular character set use POKE 23607,60.

9905 CLEAR 64499: RESTORE 9910: FOR N= 65507 TO 65529: READ A: POKE N,A: NEXT N
9910 DATA 17,0,251,1,0,3,42,54,92,36,126,167,31,192,18,35,19,13,32,246,16,244,201

Scroll Left / Scroll Right

The next one is another machine code routine that scrolls the middle of the screen to the left or right (actually, it is two routines). The routines can be modified to scroll any third of the screen. A table of what to POKE is given after the BASIC loader program.

USR 65000 = LEFT     USR 65025 = RIGHT

5 CLEAR 64999: FOR N=65000 TO 65049: READ A: POKE N,A: NEXT N
10 DATA 1,0,8,197,33,255,80,14,32,167,203,22,43,13,32,250,62,72,188,32,242,193,16,235,201
20 DATA 1,0,8,197,33,0,72,14,32,167,203,30,35,13,32,250,62,80,188,32,242,193,16,235,201
Part of screenPOKE 65005POKE 65006POKE 65030POKE 65031
TOP25572064
middle25580072
bottom25588080

Search and Replace

The last one that I found is a Search and Replace routine. To use it, enter the character to be replaced and the character it is to be changed to (you could modify it to accept numerical values) and then enter two numbers. The first is the start of the data to be searched and the second is the end of the area to be checked. The program does the rest.

10 CLEAR 65367
15 FOR N=65368 TO 65397: READ A: POKE N,A: NEXT N
20 DATA 33,0,0,62,0,70,191,32,2,54,0,245,62,0,189,40,2,24,5,62,0,188,40,4,35,241,24,231,241,201
25 INPUT "ENTER ADDRESS TO START SEARCH -->";START
30 INPUT "ENTER END ADDRESS -->";END
35 INPUT "TYPE CHARACTER TO BE REPLACED -->";R$
40 INPUT "TYPE CHARACTER FOR ";(R$);" TO BE CHANGED TO -->";S$
45 POKE 65370, INT(START/256): POKE 65369,START-(PEEK(65370)*256)
50 POKE 65372, CODE R$: POKE 65378, CODE S$
55 POKE 65388, INT(END/256): POKE 65381,END-(PEEK(65388)*256)
60 RANDOMIZE USR 65368

I retyped this from Eric since it was sent to me in the 64 column format on the 2040 paper and I know that many of you have a hard time reading it. I proof read it several times, so I hope that I made no type errors. Here are a couple of other items Eric sent along.

Elapsed-Time Display

This routine assigns T$ the current time elapsed in minutes and seconds, from the time line 20 was executed.

5 DIM T$(6): LET T$="  :"
10 POKE 23673,0
15 POKE 23672,0
20 LET T=INT ((PEEK 23673*256+PEEK 23672)/60)
25 LET M=INT (T/60): LET S=T-M*60
30 LET T$( TO 2)=STR$ M: IF LEN STR$ M=1 THEN LET T$( TO 2)="0"+STR$ M
35 LET T$(4 TO 5)=STR$ S: IF LEN STR$ S=1 THEN LET T$(4 TO 5)="0"+STR$ S
40 PRINT AT 11,12;T$
45 GO TO 20

HEX-PRINTER

1 REM HEX-PRINTER
5 LET A$="": LET B$=""
10 INPUT "Starting point input? ";X: PRINT AT 0,0;"HEX HEX";TAB 15;"DEC.";AT 1,0;"ADDR CODE";TAB 15;"ADDR."'"---- -----"
12 PRINT AT 0,24;"DECIMAL";AT 1,25;"CODE"''
15 PLOT 112,0: DRAW 0,175: GO SUB 55: LET A$=A$+" "
20 FOR N=1 TO 3: GO SUB 40: LET A$=A$+" ": GO SUB 60
25 LET X=X+1: IF X>65535 THEN LET X=0
27 IF LEN B$>10 THEN LET B$=B$( TO (LEN B$-1))
30 NEXT N: PRINT A$;TAB 15;X-3;TAB 21;B$
35 LET A$="": LET B$="": GO TO 15
40 LET J=PEEK X
45 LET Y=INT (J/16): LET Z=J-Y*16
50 LET A$=A$+CHR$ (48+Y+7*(Y>9))+CHR$ (48+Z+7*(Z>9)): RETURN
55 LET J=INT (X/256): GO SUB 45: LET J=X-256*J: GO TO 45
60 LET X$=STR$ PEEK X
65 IF LEN X$<3 THEN LET X$=" "+X$: GO TO 65
70 LET B$=B$+X$+" ": RETURN

Products

 

Media

 

Image Gallery

Source Code

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

Scroll to Top