From 8576353b738ddcbb15c5003be6ffc98890bb98fe Mon Sep 17 00:00:00 2001 From: Russell-S-Harper Date: Sun, 31 Mar 2019 18:36:58 -0400 Subject: [PATCH] Adding definition for memory map and status flags. --- common/common.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/common.h b/common/common.h index 240fd04..ca1deae 100644 --- a/common/common.h +++ b/common/common.h @@ -46,6 +46,9 @@ ; SVI pq 0e pq (int(Rp)) <- Rq - save indirect via allocated memory offset ; CMR pq 0f pq F <- Rp <=> Rq - compare registers +; 32 bytes in page zero for memory map allocation +_MAP = _R0 - 256 / 8 + ; 40 bytes in page zero for common registers _R0 = $100 - 4 * (10 + 10) _R1 = _R0 + 4 @@ -130,6 +133,10 @@ _RPR_I = _RPV_I + 4 ; 2 bytes real memory address _RPS_I = _RPR_I + 2 ; 1 byte size in pages: code + allocated memory + context switching _RPF_I = _RPS_I + 1 ; 1 byte status PPPCCCLF: P priority / C counter / L loaded / F finished +; bits for status +_S_L = 1 ; if program is loaded in memory +_S_F = 2 ; if program is finished + _RPE = _RPF_I + 1 ; size of running process entry _RPL = _RPS / _RPE ; number of running processes limit