Home » Personal collection » Acorn hard disk » games » ?lite » MoreBits/Develop/!NewText/DisplayTxt

MoreBits/Develop/!NewText/DisplayTxt

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn hard disk » games » ?lite
Filename: MoreBits/Develop/!NewText/DisplayTxt
Read OK:
File size: 029A bytes
Load address: 0000
Exec address: 0000
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10 REM > DisplayTxt
   15 MODE 13
   20 *SLOAD <Obey$Dir>.Letters
   25 REPEAT
   30   INPUT message$
   40   length=LEN(message$)
   50   Middle=512
   60   LetSize=8
   70   StrtPnt=Middle-(length*LetSize*2)
   80  REM length is the length of the text in characters
   90  REM Middle is the middle of the screen, 512
  100 REM LetSize is the pixel width of each letter plus 1 pixel
  110 REM
  120    FOR character=1 TO length
  125 IF MID$(message$,character,1)=" " NEXT character:ENDIF
  130     OSCLI("SCHOOSE "+(MID$(message$,character,1)))
  140     CharCoord=StrtPnt+(character*8*4)
  150     PLOT &ED,CharCoord,70
  160   NEXT character
  165 PRINTTAB(1,1) "Hit any key to continue"
  166 PRINTTAB(2,2) "Enter 'end' at ? to end"
  167 w$=GET$:CLS
  170 UNTIL message$="END"

 � > DisplayTxt
	 � 13
 *SLOAD <Obey$Dir>.Letters
 �
   � message$
(   length=�(message$)
2   Middle=512
<   LetSize=8
F(   StrtPnt=Middle-(length*LetSize*2)
P6  � length is the length of the text in characters
Z/  � Middle is the middle of the screen, 512
d= � LetSize is the pixel width of each letter plus 1 pixel
n �
x    � character=1 � length
}/ � �message$,character,1)=" " � character:�
�/     �("SCHOOSE "+(�message$,character,1)))
�*     CharCoord=StrtPnt+(character*8*4)
�     � &ED,CharCoord,70
�   � character
�% �1,1) "Hit any key to continue"
�% �2,2) "Enter 'end' at ? to end"
� w$=�:�
� � message$="END"
�
00000000  0d 00 0a 13 20 f4 20 3e  20 44 69 73 70 6c 61 79  |.... . > Display|
00000010  54 78 74 0d 00 0f 09 20  eb 20 31 33 0d 00 14 1e  |Txt.... . 13....|
00000020  20 2a 53 4c 4f 41 44 20  3c 4f 62 65 79 24 44 69  | *SLOAD <Obey$Di|
00000030  72 3e 2e 4c 65 74 74 65  72 73 0d 00 19 06 20 f5  |r>.Letters.... .|
00000040  0d 00 1e 11 20 20 20 e8  20 6d 65 73 73 61 67 65  |....   . message|
00000050  24 0d 00 28 19 20 20 20  6c 65 6e 67 74 68 3d a9  |$..(.   length=.|
00000060  28 6d 65 73 73 61 67 65  24 29 0d 00 32 11 20 20  |(message$)..2.  |
00000070  20 4d 69 64 64 6c 65 3d  35 31 32 0d 00 3c 10 20  | Middle=512..<. |
00000080  20 20 4c 65 74 53 69 7a  65 3d 38 0d 00 46 28 20  |  LetSize=8..F( |
00000090  20 20 53 74 72 74 50 6e  74 3d 4d 69 64 64 6c 65  |  StrtPnt=Middle|
000000a0  2d 28 6c 65 6e 67 74 68  2a 4c 65 74 53 69 7a 65  |-(length*LetSize|
000000b0  2a 32 29 0d 00 50 36 20  20 f4 20 6c 65 6e 67 74  |*2)..P6  . lengt|
000000c0  68 20 69 73 20 74 68 65  20 6c 65 6e 67 74 68 20  |h is the length |
000000d0  6f 66 20 74 68 65 20 74  65 78 74 20 69 6e 20 63  |of the text in c|
000000e0  68 61 72 61 63 74 65 72  73 0d 00 5a 2f 20 20 f4  |haracters..Z/  .|
000000f0  20 4d 69 64 64 6c 65 20  69 73 20 74 68 65 20 6d  | Middle is the m|
00000100  69 64 64 6c 65 20 6f 66  20 74 68 65 20 73 63 72  |iddle of the scr|
00000110  65 65 6e 2c 20 35 31 32  0d 00 64 3d 20 f4 20 4c  |een, 512..d= . L|
00000120  65 74 53 69 7a 65 20 69  73 20 74 68 65 20 70 69  |etSize is the pi|
00000130  78 65 6c 20 77 69 64 74  68 20 6f 66 20 65 61 63  |xel width of eac|
00000140  68 20 6c 65 74 74 65 72  20 70 6c 75 73 20 31 20  |h letter plus 1 |
00000150  70 69 78 65 6c 0d 00 6e  06 20 f4 0d 00 78 1e 20  |pixel..n. ...x. |
00000160  20 20 20 e3 20 63 68 61  72 61 63 74 65 72 3d 31  |   . character=1|
00000170  20 b8 20 6c 65 6e 67 74  68 0d 00 7d 2f 20 e7 20  | . length..}/ . |
00000180  c1 6d 65 73 73 61 67 65  24 2c 63 68 61 72 61 63  |.message$,charac|
00000190  74 65 72 2c 31 29 3d 22  20 22 20 ed 20 63 68 61  |ter,1)=" " . cha|
000001a0  72 61 63 74 65 72 3a cd  0d 00 82 2f 20 20 20 20  |racter:..../    |
000001b0  20 ff 28 22 53 43 48 4f  4f 53 45 20 22 2b 28 c1  | .("SCHOOSE "+(.|
000001c0  6d 65 73 73 61 67 65 24  2c 63 68 61 72 61 63 74  |message$,charact|
000001d0  65 72 2c 31 29 29 29 0d  00 8c 2a 20 20 20 20 20  |er,1)))...*     |
000001e0  43 68 61 72 43 6f 6f 72  64 3d 53 74 72 74 50 6e  |CharCoord=StrtPn|
000001f0  74 2b 28 63 68 61 72 61  63 74 65 72 2a 38 2a 34  |t+(character*8*4|
00000200  29 0d 00 96 1b 20 20 20  20 20 f0 20 26 45 44 2c  |)....     . &ED,|
00000210  43 68 61 72 43 6f 6f 72  64 2c 37 30 0d 00 a0 12  |CharCoord,70....|
00000220  20 20 20 ed 20 63 68 61  72 61 63 74 65 72 0d 00  |   . character..|
00000230  a5 25 20 f1 8a 31 2c 31  29 20 22 48 69 74 20 61  |.% ..1,1) "Hit a|
00000240  6e 79 20 6b 65 79 20 74  6f 20 63 6f 6e 74 69 6e  |ny key to contin|
00000250  75 65 22 0d 00 a6 25 20  f1 8a 32 2c 32 29 20 22  |ue"...% ..2,2) "|
00000260  45 6e 74 65 72 20 27 65  6e 64 27 20 61 74 20 3f  |Enter 'end' at ?|
00000270  20 74 6f 20 65 6e 64 22  0d 00 a7 0b 20 77 24 3d  | to end".... w$=|
00000280  be 3a db 0d 00 aa 15 20  fd 20 6d 65 73 73 61 67  |.:..... . messag|
00000290  65 24 3d 22 45 4e 44 22  0d ff                    |e$="END"..|
0000029a