Home » Archimedes archive » Archimedes World » AW-1996-02-Disc2.adf » !Z80Dem_Z80Demo » !Z80Dem/!Run

!Z80Dem/!Run

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 » AW-1996-02-Disc2.adf » !Z80Dem_Z80Demo
Filename: !Z80Dem/!Run
Read OK:
File size: 0421 bytes
Load address: 0000
Exec address: 0000
File contents
|
| !Run file for Z80Em
| (c) 1995 Michael and Anne Borcherds
|

| Set up directory path and load sprites
Set Z80Em$Dir <Obey$Dir>
Set Z80Em$Res <Obey$Dir>.Resources
IconSprites <Z80Em$Res>.!Sprites

| Check OS Version
Set Z80Em$OSVer 3
RMEnsure UtilityModule 3.00 Set Z80Em$OSVer 2

| Grab SNA & Z80 files (Official Acorn filetypes)
Set File$Type_BA1 SNA
Set File$Type_BA0 Z80
IF <Z80Em$OSVer>=3 Then Set Alias$@RunType_BA1 Run <Z80Em$Res>.Check2 %%*0
IF <Z80Em$OSVer>=3 Then Set Alias$@RunType_BA0 Run <Z80Em$Res>.Check2 %%*0
IF <Z80Em$OSVer>=2 Then Set Alias$@RunType_BA1 Run <Z80Em$Dir>.!Run %%*0
IF <Z80Em$OSVer>=2 Then Set Alias$@RunType_BA0 Run <Z80Em$Dir>.!Run %%*0

| Check we have enough memory to run
WimpSlot -max 224k -min 224k

| Change wimpslot to what we actually want
WimpSlot -max 32k -min 32k

| Load the modules
RMEnsure Z80Support 0.12 RMRun <Z80Em$Res>.Z80Support
RMEnsure Z80Support 0.12 Error Z80Support module too old
RMLoad <Z80Em$Res>.Mode60

| Load the Keys file
/<Z80Em$Res>.ReadKeys

| Run the program
<Z80Em$Dir>.!RunImage %*0
00000000  7c 0a 7c 20 21 52 75 6e  20 66 69 6c 65 20 66 6f  ||.| !Run file fo|
00000010  72 20 5a 38 30 45 6d 0a  7c 20 28 63 29 20 31 39  |r Z80Em.| (c) 19|
00000020  39 35 20 4d 69 63 68 61  65 6c 20 61 6e 64 20 41  |95 Michael and A|
00000030  6e 6e 65 20 42 6f 72 63  68 65 72 64 73 0a 7c 0a  |nne Borcherds.|.|
00000040  0a 7c 20 53 65 74 20 75  70 20 64 69 72 65 63 74  |.| Set up direct|
00000050  6f 72 79 20 70 61 74 68  20 61 6e 64 20 6c 6f 61  |ory path and loa|
00000060  64 20 73 70 72 69 74 65  73 0a 53 65 74 20 5a 38  |d sprites.Set Z8|
00000070  30 45 6d 24 44 69 72 20  3c 4f 62 65 79 24 44 69  |0Em$Dir <Obey$Di|
00000080  72 3e 0a 53 65 74 20 5a  38 30 45 6d 24 52 65 73  |r>.Set Z80Em$Res|
00000090  20 3c 4f 62 65 79 24 44  69 72 3e 2e 52 65 73 6f  | <Obey$Dir>.Reso|
000000a0  75 72 63 65 73 0a 49 63  6f 6e 53 70 72 69 74 65  |urces.IconSprite|
000000b0  73 20 3c 5a 38 30 45 6d  24 52 65 73 3e 2e 21 53  |s <Z80Em$Res>.!S|
000000c0  70 72 69 74 65 73 0a 0a  7c 20 43 68 65 63 6b 20  |prites..| Check |
000000d0  4f 53 20 56 65 72 73 69  6f 6e 0a 53 65 74 20 5a  |OS Version.Set Z|
000000e0  38 30 45 6d 24 4f 53 56  65 72 20 33 0a 52 4d 45  |80Em$OSVer 3.RME|
000000f0  6e 73 75 72 65 20 55 74  69 6c 69 74 79 4d 6f 64  |nsure UtilityMod|
00000100  75 6c 65 20 33 2e 30 30  20 53 65 74 20 5a 38 30  |ule 3.00 Set Z80|
00000110  45 6d 24 4f 53 56 65 72  20 32 0a 0a 7c 20 47 72  |Em$OSVer 2..| Gr|
00000120  61 62 20 53 4e 41 20 26  20 5a 38 30 20 66 69 6c  |ab SNA & Z80 fil|
00000130  65 73 20 28 4f 66 66 69  63 69 61 6c 20 41 63 6f  |es (Official Aco|
00000140  72 6e 20 66 69 6c 65 74  79 70 65 73 29 0a 53 65  |rn filetypes).Se|
00000150  74 20 46 69 6c 65 24 54  79 70 65 5f 42 41 31 20  |t File$Type_BA1 |
00000160  53 4e 41 0a 53 65 74 20  46 69 6c 65 24 54 79 70  |SNA.Set File$Typ|
00000170  65 5f 42 41 30 20 5a 38  30 0a 49 46 20 3c 5a 38  |e_BA0 Z80.IF <Z8|
00000180  30 45 6d 24 4f 53 56 65  72 3e 3d 33 20 54 68 65  |0Em$OSVer>=3 The|
00000190  6e 20 53 65 74 20 41 6c  69 61 73 24 40 52 75 6e  |n Set Alias$@Run|
000001a0  54 79 70 65 5f 42 41 31  20 52 75 6e 20 3c 5a 38  |Type_BA1 Run <Z8|
000001b0  30 45 6d 24 52 65 73 3e  2e 43 68 65 63 6b 32 20  |0Em$Res>.Check2 |
000001c0  25 25 2a 30 0a 49 46 20  3c 5a 38 30 45 6d 24 4f  |%%*0.IF <Z80Em$O|
000001d0  53 56 65 72 3e 3d 33 20  54 68 65 6e 20 53 65 74  |SVer>=3 Then Set|
000001e0  20 41 6c 69 61 73 24 40  52 75 6e 54 79 70 65 5f  | Alias$@RunType_|
000001f0  42 41 30 20 52 75 6e 20  3c 5a 38 30 45 6d 24 52  |BA0 Run <Z80Em$R|
00000200  65 73 3e 2e 43 68 65 63  6b 32 20 25 25 2a 30 0a  |es>.Check2 %%*0.|
00000210  49 46 20 3c 5a 38 30 45  6d 24 4f 53 56 65 72 3e  |IF <Z80Em$OSVer>|
00000220  3d 32 20 54 68 65 6e 20  53 65 74 20 41 6c 69 61  |=2 Then Set Alia|
00000230  73 24 40 52 75 6e 54 79  70 65 5f 42 41 31 20 52  |s$@RunType_BA1 R|
00000240  75 6e 20 3c 5a 38 30 45  6d 24 44 69 72 3e 2e 21  |un <Z80Em$Dir>.!|
00000250  52 75 6e 20 25 25 2a 30  0a 49 46 20 3c 5a 38 30  |Run %%*0.IF <Z80|
00000260  45 6d 24 4f 53 56 65 72  3e 3d 32 20 54 68 65 6e  |Em$OSVer>=2 Then|
00000270  20 53 65 74 20 41 6c 69  61 73 24 40 52 75 6e 54  | Set Alias$@RunT|
00000280  79 70 65 5f 42 41 30 20  52 75 6e 20 3c 5a 38 30  |ype_BA0 Run <Z80|
00000290  45 6d 24 44 69 72 3e 2e  21 52 75 6e 20 25 25 2a  |Em$Dir>.!Run %%*|
000002a0  30 0a 0a 7c 20 43 68 65  63 6b 20 77 65 20 68 61  |0..| Check we ha|
000002b0  76 65 20 65 6e 6f 75 67  68 20 6d 65 6d 6f 72 79  |ve enough memory|
000002c0  20 74 6f 20 72 75 6e 0a  57 69 6d 70 53 6c 6f 74  | to run.WimpSlot|
000002d0  20 2d 6d 61 78 20 32 32  34 6b 20 2d 6d 69 6e 20  | -max 224k -min |
000002e0  32 32 34 6b 0a 0a 7c 20  43 68 61 6e 67 65 20 77  |224k..| Change w|
000002f0  69 6d 70 73 6c 6f 74 20  74 6f 20 77 68 61 74 20  |impslot to what |
00000300  77 65 20 61 63 74 75 61  6c 6c 79 20 77 61 6e 74  |we actually want|
00000310  0a 57 69 6d 70 53 6c 6f  74 20 2d 6d 61 78 20 33  |.WimpSlot -max 3|
00000320  32 6b 20 2d 6d 69 6e 20  33 32 6b 0a 0a 7c 20 4c  |2k -min 32k..| L|
00000330  6f 61 64 20 74 68 65 20  6d 6f 64 75 6c 65 73 0a  |oad the modules.|
00000340  52 4d 45 6e 73 75 72 65  20 5a 38 30 53 75 70 70  |RMEnsure Z80Supp|
00000350  6f 72 74 20 30 2e 31 32  20 52 4d 52 75 6e 20 3c  |ort 0.12 RMRun <|
00000360  5a 38 30 45 6d 24 52 65  73 3e 2e 5a 38 30 53 75  |Z80Em$Res>.Z80Su|
00000370  70 70 6f 72 74 0a 52 4d  45 6e 73 75 72 65 20 5a  |pport.RMEnsure Z|
00000380  38 30 53 75 70 70 6f 72  74 20 30 2e 31 32 20 45  |80Support 0.12 E|
00000390  72 72 6f 72 20 5a 38 30  53 75 70 70 6f 72 74 20  |rror Z80Support |
000003a0  6d 6f 64 75 6c 65 20 74  6f 6f 20 6f 6c 64 0a 52  |module too old.R|
000003b0  4d 4c 6f 61 64 20 3c 5a  38 30 45 6d 24 52 65 73  |MLoad <Z80Em$Res|
000003c0  3e 2e 4d 6f 64 65 36 30  0a 0a 7c 20 4c 6f 61 64  |>.Mode60..| Load|
000003d0  20 74 68 65 20 4b 65 79  73 20 66 69 6c 65 0a 2f  | the Keys file./|
000003e0  3c 5a 38 30 45 6d 24 52  65 73 3e 2e 52 65 61 64  |<Z80Em$Res>.Read|
000003f0  4b 65 79 73 0a 0a 7c 20  52 75 6e 20 74 68 65 20  |Keys..| Run the |
00000400  70 72 6f 67 72 61 6d 0a  3c 5a 38 30 45 6d 24 44  |program.<Z80Em$D|
00000410  69 72 3e 2e 21 52 75 6e  49 6d 61 67 65 20 25 2a  |ir>.!RunImage %*|
00000420  30                                                |0|
00000421