Mercurial > hg > Members > kono > nitros9-code
comparison level2/modules/kernel/fdelram.asm @ 1145:ca83286ded5b
Start of new OS-9 L2 Kernel
author | boisy |
---|---|
date | Tue, 22 Apr 2003 19:35:48 +0000 |
parents | |
children | dfd2e7080b4d |
comparison
equal
deleted
inserted
replaced
1144:2cdb7acff8aa | 1145:ca83286ded5b |
---|---|
1 * F$DelRAM entry point --- moved over from OS9p2 | |
2 FDelRAM ldb R$B,u # of blocks to de-allocate | |
3 beq DelRAM.2 if none, exit | |
4 ldd <D.BlkMap+2 get end of the block map | |
5 subd <D.BlkMap subtract out start of the block map | |
6 subd R$X,u take out starting block number | |
7 bls DelRAM.2 exit if the starting block is ># of blocks available | |
8 tsta check high byte of RAM # | |
9 bne DelRAM.0 if not zero, skip it | |
10 cmpb R$B,u check against size of the block | |
11 bhs DelRAM.0 if size is >RAM available | |
12 stb R$B,u save actual # of blocks deleted | |
13 DelRAM.0 ldx <D.BlkMap get start address of the block map | |
14 ldd R$X,u starting address of the RAM to de-allocate | |
15 leax d,x slower, but smaller than ADDR | |
16 ldb R$B,u get actual # of blocks to de-allocate | |
17 DelRAM.1 equ * | |
18 IFNE H6309 | |
19 aim #^RAMinUse,,x+ set to RAM not in use | |
20 ELSE | |
21 lda ,x | |
22 anda #^RAMinUse | |
23 sta ,x+ | |
24 ENDC | |
25 decb count down a block | |
26 bne DelRAM.1 continue | |
27 DelRAM.2 clrb and exit | |
28 rts |