Home » Archimedes archive » Archimedes World » archimedes_world_volume_15_issue_1_scp.adf » !ProFiler_ProFiler » !ProFiler/Utilities/GenCon/Functions/DeDOS

!ProFiler/Utilities/GenCon/Functions/DeDOS

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 » Archimedes archive » Archimedes World » archimedes_world_volume_15_issue_1_scp.adf » !ProFiler_ProFiler
Filename: !ProFiler/Utilities/GenCon/Functions/DeDOS
Read OK:
File size: 0177 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM>DeDOS
   11REM Example of generic converter
   12REM FNOutput returns output type depending on input
   13REM FNConvert converts I$ to O$, and returns error string if any
   20
   30DEFFNOutput(T%)
   40IFT%=&FFFORT%=&FDB =&FFF ELSE=-2
   50
   60DEFFNConvert(I$,O$)
   70ONERRORLOCAL=REPORT$
   80F%=OPENINI$
   90G%=OPENOUTO$
  110WHILENOTEOF#F%
  120 B%=BGET#F%
  130 IFB%<>13IFB%<>26BPUT#G%,B%
  160ENDWHILE
  170CLOSE#F%
  180CLOSE#G%
  190SYS "OS_File",18,O$,&FFF
  200=""

�>DeDOS
"� Example of generic converter
5� FNOutput returns output type depending on input

B� FNConvert converts I$ to O$, and returns error string if any

ݤOutput(T%)
(�T%=&FFF�T%=&FDB =&FFF �=-2
2
<ݤConvert(I$,O$)
F
��=�$
P
F%=�I$
Z
G%=�O$
nȕ��#F%
x B%=�#F%
� �B%<>13�B%<>26�#G%,B%
��
��#F%
��#G%
�ș "OS_File",18,O$,&FFF
�=""
�
00000000  0d 00 0a 0b f4 3e 44 65  44 4f 53 0d 00 0b 22 f4  |.....>DeDOS...".|
00000010  20 45 78 61 6d 70 6c 65  20 6f 66 20 67 65 6e 65  | Example of gene|
00000020  72 69 63 20 63 6f 6e 76  65 72 74 65 72 0d 00 0c  |ric converter...|
00000030  35 f4 20 46 4e 4f 75 74  70 75 74 20 72 65 74 75  |5. FNOutput retu|
00000040  72 6e 73 20 6f 75 74 70  75 74 20 74 79 70 65 20  |rns output type |
00000050  64 65 70 65 6e 64 69 6e  67 20 6f 6e 20 69 6e 70  |depending on inp|
00000060  75 74 0d 00 0d 42 f4 20  46 4e 43 6f 6e 76 65 72  |ut...B. FNConver|
00000070  74 20 63 6f 6e 76 65 72  74 73 20 49 24 20 74 6f  |t converts I$ to|
00000080  20 4f 24 2c 20 61 6e 64  20 72 65 74 75 72 6e 73  | O$, and returns|
00000090  20 65 72 72 6f 72 20 73  74 72 69 6e 67 20 69 66  | error string if|
000000a0  20 61 6e 79 0d 00 14 04  0d 00 1e 10 dd a4 4f 75  | any..........Ou|
000000b0  74 70 75 74 28 54 25 29  0d 00 28 1f e7 54 25 3d  |tput(T%)..(..T%=|
000000c0  26 46 46 46 84 54 25 3d  26 46 44 42 20 3d 26 46  |&FFF.T%=&FDB =&F|
000000d0  46 46 20 8b 3d 2d 32 0d  00 32 04 0d 00 3c 14 dd  |FF .=-2..2...<..|
000000e0  a4 43 6f 6e 76 65 72 74  28 49 24 2c 4f 24 29 0d  |.Convert(I$,O$).|
000000f0  00 46 0a ee 85 ea 3d f6  24 0d 00 50 0a 46 25 3d  |.F....=.$..P.F%=|
00000100  8e 49 24 0d 00 5a 0a 47  25 3d ae 4f 24 0d 00 6e  |.I$..Z.G%=.O$..n|
00000110  0b c8 95 ac c5 23 46 25  0d 00 78 0c 20 42 25 3d  |.....#F%..x. B%=|
00000120  9a 23 46 25 0d 00 82 1a  20 e7 42 25 3c 3e 31 33  |.#F%.... .B%<>13|
00000130  e7 42 25 3c 3e 32 36 d5  23 47 25 2c 42 25 0d 00  |.B%<>26.#G%,B%..|
00000140  a0 05 ce 0d 00 aa 08 d9  23 46 25 0d 00 b4 08 d9  |........#F%.....|
00000150  23 47 25 0d 00 be 1b c8  99 20 22 4f 53 5f 46 69  |#G%...... "OS_Fi|
00000160  6c 65 22 2c 31 38 2c 4f  24 2c 26 46 46 46 0d 00  |le",18,O$,&FFF..|
00000170  c8 07 3d 22 22 0d ff                              |..=""..|
00000177