Home » Archimedes archive » Acorn User » Acorn User - Updated Shareware Collection (1994).adf » Programs » AppEnsure/Source/Constants

AppEnsure/Source/Constants

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 » Acorn User » Acorn User - Updated Shareware Collection (1994).adf » Programs
Filename: AppEnsure/Source/Constants
Read OK:
File size: 04EF bytes
Load address: 0000
Exec address: 0000
File contents
   10REM  >Constants
   20REM        Various constants
   30:
   40DEF PROC_Define_Constants
   50:::
   60::
   70:
   80LF%      = 10                   :  REM  Separates lines in a file
   90:::
  100::
  110:  REM  The following are used in OS_PrettyPrint strings
  120::
  130:::
  140all$      = CHR$(27)+ CHR$(38)  :  REM  " all "
  150and$      = CHR$(27)+ CHR$(16)  :  REM  " and "
  160default$  = CHR$(27)+ CHR$(8)   :  REM  "default "
  170director$ = CHR$(27)+ CHR$(3)   :  REM  "director"
  180file$     = CHR$(27)+ CHR$(7)   :  REM  "file"
  190is$       = CHR$(27)+ CHR$(41)  :  REM  " is "
  200Name$     = CHR$(27)+ CHR$(11)  :  REM  "name"
  210name$     = CHR$(27)+ CHR$(0)   :  REM  R2-string
  220nl$       = CHR$(13)
  230syntax$   = CHR$(27)+ CHR$(1)   :  REM  "Syntax: *"+ R2
  240syntaxf$  = CHR$(27)+ CHR$(27)  :  REM  "Syntax: *"+ R2+ " <filename>"
  250syntaxo$  = CHR$(27)+ CHR$(30)  :  REM  "Syntax: *"+ R2+ " ["
  260tab$      = CHR$(9)
  270the$      = CHR$(27)+ CHR$(2)   :  REM  " the "
  280to$       = CHR$(27)+ CHR$(40)  :  REM  " to "
  290:
  300::
  310:::
  320  sl = 10
  330  ip = 11
  340  fp = 12
  350  sp = 13
  360  lr = 14
  370  local = sp
  380  PSR_N  = 1 << 31
  390  PSR_Z  = 1 << 30
  400  PSR_C  = 1 << 29
  410  PSR_V  = 1 << 28
  420  PSR_I  = 1 << 27
  430  PSR_F  = 1 << 26
  440  PSR_S1 = 1 << 1
  450  PSR_S0 = 1 << 0
  460  SWI_X  = 1 << 17
  470  OS_WriteI = &100
  480  XOS_WriteI = OS_WriteI + SWI_X
  490ENDPROC
  500:
  510

�  >Constants
�        Various constants
:
(� �_Define_Constants
2:::
<::
F:
PCLF%      = 10                   :  �  Separates lines in a file
Z:::
d::
n::  �  The following are used in OS_PrettyPrint strings
x::
�:::
�+all$      = �(27)+ �(38)  :  �  " all "
�+and$      = �(27)+ �(16)  :  �  " and "
�.default$  = �(27)+ �(8)   :  �  "default "
�.director$ = �(27)+ �(3)   :  �  "director"
�*file$     = �(27)+ �(7)   :  �  "file"
�*is$       = �(27)+ �(41)  :  �  " is "
�*Name$     = �(27)+ �(11)  :  �  "name"
�-name$     = �(27)+ �(0)   :  �  R2-string
�nl$       = �(13)
�3syntax$   = �(27)+ �(1)   :  �  "Syntax: *"+ R2
�Bsyntaxf$  = �(27)+ �(27)  :  �  "Syntax: *"+ R2+ " <filename>"
�9syntaxo$  = �(27)+ �(30)  :  �  "Syntax: *"+ R2+ " ["
tab$      = �(9)
+the$      = �(27)+ �(2)   :  �  " the "
*to$       = �(27)+ �(40)  :  �  " to "
":
,::
6:::
@
  sl = 10
J
  ip = 11
T
  fp = 12
^
  sp = 13
h
  lr = 14
r  local = sp
|  PSR_N  = 1 << 31
�  PSR_Z  = 1 << 30
�  PSR_C  = 1 << 29
�  PSR_V  = 1 << 28
�  PSR_I  = 1 << 27
�  PSR_F  = 1 << 26
�  PSR_S1 = 1 << 1
�  PSR_S0 = 1 << 0
�  SWI_X  = 1 << 17
�  OS_WriteI = &100
�$  XOS_WriteI = OS_WriteI + SWI_X
��
�:
�
�
00000000  0d 00 0a 11 f4 20 20 3e  43 6f 6e 73 74 61 6e 74  |.....  >Constant|
00000010  73 0d 00 14 1e f4 20 20  20 20 20 20 20 20 56 61  |s.....        Va|
00000020  72 69 6f 75 73 20 63 6f  6e 73 74 61 6e 74 73 0d  |rious constants.|
00000030  00 1e 05 3a 0d 00 28 18  dd 20 f2 5f 44 65 66 69  |...:..(.. ._Defi|
00000040  6e 65 5f 43 6f 6e 73 74  61 6e 74 73 0d 00 32 07  |ne_Constants..2.|
00000050  3a 3a 3a 0d 00 3c 06 3a  3a 0d 00 46 05 3a 0d 00  |:::..<.::..F.:..|
00000060  50 43 4c 46 25 20 20 20  20 20 20 3d 20 31 30 20  |PCLF%      = 10 |
00000070  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000080  20 20 3a 20 20 f4 20 20  53 65 70 61 72 61 74 65  |  :  .  Separate|
00000090  73 20 6c 69 6e 65 73 20  69 6e 20 61 20 66 69 6c  |s lines in a fil|
000000a0  65 0d 00 5a 07 3a 3a 3a  0d 00 64 06 3a 3a 0d 00  |e..Z.:::..d.::..|
000000b0  6e 3a 3a 20 20 f4 20 20  54 68 65 20 66 6f 6c 6c  |n::  .  The foll|
000000c0  6f 77 69 6e 67 20 61 72  65 20 75 73 65 64 20 69  |owing are used i|
000000d0  6e 20 4f 53 5f 50 72 65  74 74 79 50 72 69 6e 74  |n OS_PrettyPrint|
000000e0  20 73 74 72 69 6e 67 73  0d 00 78 06 3a 3a 0d 00  | strings..x.::..|
000000f0  82 07 3a 3a 3a 0d 00 8c  2b 61 6c 6c 24 20 20 20  |..:::...+all$   |
00000100  20 20 20 3d 20 bd 28 32  37 29 2b 20 bd 28 33 38  |   = .(27)+ .(38|
00000110  29 20 20 3a 20 20 f4 20  20 22 20 61 6c 6c 20 22  |)  :  .  " all "|
00000120  0d 00 96 2b 61 6e 64 24  20 20 20 20 20 20 3d 20  |...+and$      = |
00000130  bd 28 32 37 29 2b 20 bd  28 31 36 29 20 20 3a 20  |.(27)+ .(16)  : |
00000140  20 f4 20 20 22 20 61 6e  64 20 22 0d 00 a0 2e 64  | .  " and "....d|
00000150  65 66 61 75 6c 74 24 20  20 3d 20 bd 28 32 37 29  |efault$  = .(27)|
00000160  2b 20 bd 28 38 29 20 20  20 3a 20 20 f4 20 20 22  |+ .(8)   :  .  "|
00000170  64 65 66 61 75 6c 74 20  22 0d 00 aa 2e 64 69 72  |default "....dir|
00000180  65 63 74 6f 72 24 20 3d  20 bd 28 32 37 29 2b 20  |ector$ = .(27)+ |
00000190  bd 28 33 29 20 20 20 3a  20 20 f4 20 20 22 64 69  |.(3)   :  .  "di|
000001a0  72 65 63 74 6f 72 22 0d  00 b4 2a 66 69 6c 65 24  |rector"...*file$|
000001b0  20 20 20 20 20 3d 20 bd  28 32 37 29 2b 20 bd 28  |     = .(27)+ .(|
000001c0  37 29 20 20 20 3a 20 20  f4 20 20 22 66 69 6c 65  |7)   :  .  "file|
000001d0  22 0d 00 be 2a 69 73 24  20 20 20 20 20 20 20 3d  |"...*is$       =|
000001e0  20 bd 28 32 37 29 2b 20  bd 28 34 31 29 20 20 3a  | .(27)+ .(41)  :|
000001f0  20 20 f4 20 20 22 20 69  73 20 22 0d 00 c8 2a 4e  |  .  " is "...*N|
00000200  61 6d 65 24 20 20 20 20  20 3d 20 bd 28 32 37 29  |ame$     = .(27)|
00000210  2b 20 bd 28 31 31 29 20  20 3a 20 20 f4 20 20 22  |+ .(11)  :  .  "|
00000220  6e 61 6d 65 22 0d 00 d2  2d 6e 61 6d 65 24 20 20  |name"...-name$  |
00000230  20 20 20 3d 20 bd 28 32  37 29 2b 20 bd 28 30 29  |   = .(27)+ .(0)|
00000240  20 20 20 3a 20 20 f4 20  20 52 32 2d 73 74 72 69  |   :  .  R2-stri|
00000250  6e 67 0d 00 dc 15 6e 6c  24 20 20 20 20 20 20 20  |ng....nl$       |
00000260  3d 20 bd 28 31 33 29 0d  00 e6 33 73 79 6e 74 61  |= .(13)...3synta|
00000270  78 24 20 20 20 3d 20 bd  28 32 37 29 2b 20 bd 28  |x$   = .(27)+ .(|
00000280  31 29 20 20 20 3a 20 20  f4 20 20 22 53 79 6e 74  |1)   :  .  "Synt|
00000290  61 78 3a 20 2a 22 2b 20  52 32 0d 00 f0 42 73 79  |ax: *"+ R2...Bsy|
000002a0  6e 74 61 78 66 24 20 20  3d 20 bd 28 32 37 29 2b  |ntaxf$  = .(27)+|
000002b0  20 bd 28 32 37 29 20 20  3a 20 20 f4 20 20 22 53  | .(27)  :  .  "S|
000002c0  79 6e 74 61 78 3a 20 2a  22 2b 20 52 32 2b 20 22  |yntax: *"+ R2+ "|
000002d0  20 3c 66 69 6c 65 6e 61  6d 65 3e 22 0d 00 fa 39  | <filename>"...9|
000002e0  73 79 6e 74 61 78 6f 24  20 20 3d 20 bd 28 32 37  |syntaxo$  = .(27|
000002f0  29 2b 20 bd 28 33 30 29  20 20 3a 20 20 f4 20 20  |)+ .(30)  :  .  |
00000300  22 53 79 6e 74 61 78 3a  20 2a 22 2b 20 52 32 2b  |"Syntax: *"+ R2+|
00000310  20 22 20 5b 22 0d 01 04  14 74 61 62 24 20 20 20  | " ["....tab$   |
00000320  20 20 20 3d 20 bd 28 39  29 0d 01 0e 2b 74 68 65  |   = .(9)...+the|
00000330  24 20 20 20 20 20 20 3d  20 bd 28 32 37 29 2b 20  |$      = .(27)+ |
00000340  bd 28 32 29 20 20 20 3a  20 20 f4 20 20 22 20 74  |.(2)   :  .  " t|
00000350  68 65 20 22 0d 01 18 2a  74 6f 24 20 20 20 20 20  |he "...*to$     |
00000360  20 20 3d 20 bd 28 32 37  29 2b 20 bd 28 34 30 29  |  = .(27)+ .(40)|
00000370  20 20 3a 20 20 f4 20 20  22 20 74 6f 20 22 0d 01  |  :  .  " to "..|
00000380  22 05 3a 0d 01 2c 06 3a  3a 0d 01 36 07 3a 3a 3a  |".:..,.::..6.:::|
00000390  0d 01 40 0d 20 20 73 6c  20 3d 20 31 30 0d 01 4a  |..@.  sl = 10..J|
000003a0  0d 20 20 69 70 20 3d 20  31 31 0d 01 54 0d 20 20  |.  ip = 11..T.  |
000003b0  66 70 20 3d 20 31 32 0d  01 5e 0d 20 20 73 70 20  |fp = 12..^.  sp |
000003c0  3d 20 31 33 0d 01 68 0d  20 20 6c 72 20 3d 20 31  |= 13..h.  lr = 1|
000003d0  34 0d 01 72 10 20 20 6c  6f 63 61 6c 20 3d 20 73  |4..r.  local = s|
000003e0  70 0d 01 7c 16 20 20 50  53 52 5f 4e 20 20 3d 20  |p..|.  PSR_N  = |
000003f0  31 20 3c 3c 20 33 31 0d  01 86 16 20 20 50 53 52  |1 << 31....  PSR|
00000400  5f 5a 20 20 3d 20 31 20  3c 3c 20 33 30 0d 01 90  |_Z  = 1 << 30...|
00000410  16 20 20 50 53 52 5f 43  20 20 3d 20 31 20 3c 3c  |.  PSR_C  = 1 <<|
00000420  20 32 39 0d 01 9a 16 20  20 50 53 52 5f 56 20 20  | 29....  PSR_V  |
00000430  3d 20 31 20 3c 3c 20 32  38 0d 01 a4 16 20 20 50  |= 1 << 28....  P|
00000440  53 52 5f 49 20 20 3d 20  31 20 3c 3c 20 32 37 0d  |SR_I  = 1 << 27.|
00000450  01 ae 16 20 20 50 53 52  5f 46 20 20 3d 20 31 20  |...  PSR_F  = 1 |
00000460  3c 3c 20 32 36 0d 01 b8  15 20 20 50 53 52 5f 53  |<< 26....  PSR_S|
00000470  31 20 3d 20 31 20 3c 3c  20 31 0d 01 c2 15 20 20  |1 = 1 << 1....  |
00000480  50 53 52 5f 53 30 20 3d  20 31 20 3c 3c 20 30 0d  |PSR_S0 = 1 << 0.|
00000490  01 cc 16 20 20 53 57 49  5f 58 20 20 3d 20 31 20  |...  SWI_X  = 1 |
000004a0  3c 3c 20 31 37 0d 01 d6  16 20 20 4f 53 5f 57 72  |<< 17....  OS_Wr|
000004b0  69 74 65 49 20 3d 20 26  31 30 30 0d 01 e0 24 20  |iteI = &100...$ |
000004c0  20 58 4f 53 5f 57 72 69  74 65 49 20 3d 20 4f 53  | XOS_WriteI = OS|
000004d0  5f 57 72 69 74 65 49 20  2b 20 53 57 49 5f 58 0d  |_WriteI + SWI_X.|
000004e0  01 ea 05 e1 0d 01 f4 05  3a 0d 01 fe 04 0d ff     |........:......|
000004ef