Release 0.0.8
This commit is contained in:
parent
800c867085
commit
db2bc37f1d
|
@ -23,6 +23,7 @@ Added EXECUTE to stage2 forth
|
|||
Added ABORT to stage2 forth
|
||||
Added string print and address to output of High level prototype disassembler
|
||||
Added initial prototype library for forth developers who want better ANS support
|
||||
Expanded stage0 VM Halcode to provide a way to lookup total amount of physical memory
|
||||
|
||||
** Changed
|
||||
Extended VPATH in makefile to shorten dependency names
|
||||
|
|
|
@ -419,6 +419,7 @@ void assemble(struct Token* p)
|
|||
setExpression(p, "FSEEK", "42100004", 4);
|
||||
setExpression(p, "FGETC", "42100100", 4);
|
||||
setExpression(p, "FPUTC", "42100200", 4);
|
||||
setExpression(p, "HAL_MEM", "42110000", 4);
|
||||
|
||||
/* 0OP Group*/
|
||||
setExpression(p, "NOP", "00000000", 4);
|
||||
|
|
|
@ -246,6 +246,7 @@ DEFINE REWIND 42100003
|
|||
DEFINE FSEEK 42100004
|
||||
DEFINE FGETC 42100100
|
||||
DEFINE FPUTC 42100200
|
||||
DEFINE HAL_MEM 42110000
|
||||
|
||||
# 0OP Group
|
||||
DEFINE NOP 00000000
|
||||
|
|
|
@ -1368,6 +1368,11 @@ void decode_HALCODE(struct Instruction* c)
|
|||
strncpy(Name, "FPUTC", 19);
|
||||
break;
|
||||
}
|
||||
case 0x110000: /* HAL_MEM */
|
||||
{
|
||||
strncpy(Name, "HAL_MEM", 19);
|
||||
break;
|
||||
}
|
||||
default: /* Unknown HALCODE*/
|
||||
{
|
||||
string_values(c);
|
||||
|
|
|
@ -572,8 +572,21 @@ The following 3 devices must exist with the following exact IDs
|
|||
|-------------+----------|
|
||||
| 42 10 03 00 | Reserved |
|
||||
| ... | Reserved |
|
||||
| 42 10 FF FF | Reserved |
|
||||
|
||||
**** Device physical specifications
|
||||
| Hex | Name | Comment |
|
||||
|-------------+---------+------------------------------------------------------------------------------|
|
||||
| 42 11 00 00 | HAL_MEM | Loads the total amount of physical Memory that is functional into register 0 |
|
||||
|
||||
**** Reserved Block for Future HALCODE Expansion
|
||||
| Hex | Name |
|
||||
|-------------+----------|
|
||||
| 42 12 00 00 | Reserved |
|
||||
| ... | Reserved |
|
||||
| 42 FF FF FF | Reserved |
|
||||
|
||||
|
||||
** Reserved Block 1
|
||||
At this time these instructions only produce a warning; but could do anything.
|
||||
DO NOT USE.
|
||||
|
|
1
vm.h
1
vm.h
|
@ -59,6 +59,7 @@ void vm_FSEEK(struct lilith* vm);
|
|||
void vm_REWIND(struct lilith* vm);
|
||||
void vm_FGETC(struct lilith* vm);
|
||||
void vm_FPUTC(struct lilith* vm);
|
||||
void vm_HAL_MEM(struct lilith* vm);
|
||||
void ADD_CI(struct lilith* vm, struct Instruction* c);
|
||||
void ADD_CO(struct lilith* vm, struct Instruction* c);
|
||||
void ADD_CIO(struct lilith* vm, struct Instruction* c);
|
||||
|
|
11
vm_decode.c
11
vm_decode.c
|
@ -283,6 +283,17 @@ bool eval_HALCODE(struct lilith* vm, struct Instruction* c)
|
|||
vm_FPUTC(vm);
|
||||
break;
|
||||
}
|
||||
case 0x110000: /* HAL_MEM */
|
||||
{
|
||||
#ifdef DEBUG
|
||||
strncpy(Name, "HAL_MEM", 19);
|
||||
#elif TRACE
|
||||
record_trace("HAL_MEM");
|
||||
#endif
|
||||
|
||||
vm_HAL_MEM(vm);
|
||||
break;
|
||||
}
|
||||
default: return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -287,6 +287,12 @@ void vm_FPUTC(struct lilith* vm)
|
|||
}
|
||||
}
|
||||
|
||||
void vm_HAL_MEM(struct lilith* vm)
|
||||
{
|
||||
vm->reg[0] = vm->amount_of_Ram;
|
||||
}
|
||||
|
||||
|
||||
/* Condition Codes */
|
||||
enum condition
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue