Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape04a_acorn_eu_1989_october.wav » MFREE

MFREE

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 tapes » Electron_User » Electron_User_tape04a_acorn_eu_1989_october.wav
Filename: MFREE
Read OK:
File size: 0239 bytes
Load address: 2000
Exec address: 1900
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
   10REM Display free memory amount
   20REM by S.P.Wade
   30FOR pass=0 TO 3 STEP 3
   40P%=&900:[OPT pass
   50LDY #0:.loop1 LDA str1,Y:CMP #&FF:BEQ next1:JSR &FFEE:INY:JMP loop1:.next1 LDA &06:SEC:SBC &02:TAX:LDA &07
   60SBC &03:JSR hex1:TXA:JSR hex1:LDY #0:.loop2 LDA str2,Y:CMP #&FF:BEQ next2:JSR &FFEE:INY:JMP loop2:.next2 RTS
   70.str1 EQUW &0A0D:EQUS"Memory free = &":EQUB &FF:.str2 EQUS" bytes":EQUD &0A0D0A0D:EQUB &FF
   80.hex1 PHA:AND #240:LSR A:ROR A:ROR A:ROR A:JSR hex2:PLA:AND #15 
   90.hex2 CLC:ADC #48:CMP #58:BCC hex3:CLC:ADC #7:.hex3 JMP &FFE3:]:NEXT
  100OSCLI"SAVE MFree 900 "+STR$~P% 

 � Display free memory amount
� by S.P.Wade
� pass=0 � 3 � 3
(P%=&900:[OPT pass
2nLDY #0:.loop1 LDA str1,Y:CMP #&FF:BEQ next1:JSR &FFEE:INY:JMP loop1:.next1 LDA &06:SEC:SBC &02:TAX:LDA &07
<pSBC &03:JSR hex1:TXA:JSR hex1:LDY #0:.loop2 LDA str2,Y:CMP #&FF:BEQ next2:JSR &FFEE:INY:JMP loop2:.next2 RTS
F^.str1 EQUW &0A0D:EQUS"Memory free = &":EQUB &FF:.str2 EQUS" bytes":EQUD &0A0D0A0D:EQUB &FF
P@.hex1 PHA:� #240:LSR A:ROR A:ROR A:ROR A:JSR hex2:PLA:� #15 
ZE.hex2 CLC:ADC #48:CMP #58:BCC hex3:CLC:ADC #7:.hex3 JMP &FFE3:]:�
d�"SAVE MFree 900 "+�~P% 
�
00000000  0d 00 0a 20 f4 20 44 69  73 70 6c 61 79 20 66 72  |... . Display fr|
00000010  65 65 20 6d 65 6d 6f 72  79 20 61 6d 6f 75 6e 74  |ee memory amount|
00000020  0d 00 14 11 f4 20 62 79  20 53 2e 50 2e 57 61 64  |..... by S.P.Wad|
00000030  65 0d 00 1e 14 e3 20 70  61 73 73 3d 30 20 b8 20  |e..... pass=0 . |
00000040  33 20 88 20 33 0d 00 28  15 50 25 3d 26 39 30 30  |3 . 3..(.P%=&900|
00000050  3a 5b 4f 50 54 20 70 61  73 73 0d 00 32 6e 4c 44  |:[OPT pass..2nLD|
00000060  59 20 23 30 3a 2e 6c 6f  6f 70 31 20 4c 44 41 20  |Y #0:.loop1 LDA |
00000070  73 74 72 31 2c 59 3a 43  4d 50 20 23 26 46 46 3a  |str1,Y:CMP #&FF:|
00000080  42 45 51 20 6e 65 78 74  31 3a 4a 53 52 20 26 46  |BEQ next1:JSR &F|
00000090  46 45 45 3a 49 4e 59 3a  4a 4d 50 20 6c 6f 6f 70  |FEE:INY:JMP loop|
000000a0  31 3a 2e 6e 65 78 74 31  20 4c 44 41 20 26 30 36  |1:.next1 LDA &06|
000000b0  3a 53 45 43 3a 53 42 43  20 26 30 32 3a 54 41 58  |:SEC:SBC &02:TAX|
000000c0  3a 4c 44 41 20 26 30 37  0d 00 3c 70 53 42 43 20  |:LDA &07..<pSBC |
000000d0  26 30 33 3a 4a 53 52 20  68 65 78 31 3a 54 58 41  |&03:JSR hex1:TXA|
000000e0  3a 4a 53 52 20 68 65 78  31 3a 4c 44 59 20 23 30  |:JSR hex1:LDY #0|
000000f0  3a 2e 6c 6f 6f 70 32 20  4c 44 41 20 73 74 72 32  |:.loop2 LDA str2|
00000100  2c 59 3a 43 4d 50 20 23  26 46 46 3a 42 45 51 20  |,Y:CMP #&FF:BEQ |
00000110  6e 65 78 74 32 3a 4a 53  52 20 26 46 46 45 45 3a  |next2:JSR &FFEE:|
00000120  49 4e 59 3a 4a 4d 50 20  6c 6f 6f 70 32 3a 2e 6e  |INY:JMP loop2:.n|
00000130  65 78 74 32 20 52 54 53  0d 00 46 5e 2e 73 74 72  |ext2 RTS..F^.str|
00000140  31 20 45 51 55 57 20 26  30 41 30 44 3a 45 51 55  |1 EQUW &0A0D:EQU|
00000150  53 22 4d 65 6d 6f 72 79  20 66 72 65 65 20 3d 20  |S"Memory free = |
00000160  26 22 3a 45 51 55 42 20  26 46 46 3a 2e 73 74 72  |&":EQUB &FF:.str|
00000170  32 20 45 51 55 53 22 20  62 79 74 65 73 22 3a 45  |2 EQUS" bytes":E|
00000180  51 55 44 20 26 30 41 30  44 30 41 30 44 3a 45 51  |QUD &0A0D0A0D:EQ|
00000190  55 42 20 26 46 46 0d 00  50 40 2e 68 65 78 31 20  |UB &FF..P@.hex1 |
000001a0  50 48 41 3a 80 20 23 32  34 30 3a 4c 53 52 20 41  |PHA:. #240:LSR A|
000001b0  3a 52 4f 52 20 41 3a 52  4f 52 20 41 3a 52 4f 52  |:ROR A:ROR A:ROR|
000001c0  20 41 3a 4a 53 52 20 68  65 78 32 3a 50 4c 41 3a  | A:JSR hex2:PLA:|
000001d0  80 20 23 31 35 20 0d 00  5a 45 2e 68 65 78 32 20  |. #15 ..ZE.hex2 |
000001e0  43 4c 43 3a 41 44 43 20  23 34 38 3a 43 4d 50 20  |CLC:ADC #48:CMP |
000001f0  23 35 38 3a 42 43 43 20  68 65 78 33 3a 43 4c 43  |#58:BCC hex3:CLC|
00000200  3a 41 44 43 20 23 37 3a  2e 68 65 78 33 20 4a 4d  |:ADC #7:.hex3 JM|
00000210  50 20 26 46 46 45 33 3a  5d 3a ed 0d 00 64 1c ff  |P &FFE3:]:...d..|
00000220  22 53 41 56 45 20 4d 46  72 65 65 20 39 30 30 20  |"SAVE MFree 900 |
00000230  22 2b c3 7e 50 25 20 0d  ff                       |"+.~P% ..|
00000239
MFREE.m0
MFREE.m1
MFREE.m2
MFREE.m4
MFREE.m5