Release 0.0.8

This commit is contained in:
Jeremiah Orians 2017-06-17 22:51:28 -04:00
parent 800c867085
commit db2bc37f1d
No known key found for this signature in database
GPG Key ID: 7457821534D2ACCD
8 changed files with 39 additions and 0 deletions

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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);

View File

@ -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
View File

@ -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);

View File

@ -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;
}

View File

@ -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
{