Skip to content

Commit

Permalink
Added partial test suite for high-nerd compliance.
Browse files Browse the repository at this point in the history
Added HW and TESTS folders to README.
  • Loading branch information
hach-que committed Apr 25, 2012
1 parent c94771a commit dae9b96
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -19,9 +19,15 @@ In here go all specifications and proposals for the layout and implementation of
### NET ### ### NET ###
Anything about networking goes in the net folder. Anything about networking goes in the net folder.


### HW ###
Anything about hardware components and communicating directly with hardware components goes in here.

### MISC ### ### MISC ###
In this directory goes everything that does not fit in the other directories defined above. In this directory goes everything that does not fit in the other directories defined above.


### TESTS ###
Tests for software that can be used to ensure standards compliance.



## Procedures and Naming Standards ## ## Procedures and Naming Standards ##


Expand Down
33 changes: 33 additions & 0 deletions TESTS/high-nerd.dasm16
@@ -0,0 +1,33 @@
;
; Unit test by James Rhodes
;
; This unit test ensures emulator compliance with how high-nerd
; should work. Corrections and expansions are appreciated.
;

;
; At the end of the test, the emulator state should be (empty
; indicates the value is unspecified):
;
; A: 0x0000 [A]:
; B: 0x0000 [B]:
; C: 0xFB50 [C]:
; X: 0x0000 [X]:
; Y: 0x0000 [Y]:
; Z: 0x0000 [Z]:
; I: 0x0000 [I]:
; J: 0x0000 [J]:
; PC: SP: 0x0000
; EX: 0x5556 IA: 0x0000
;

SET C, 500 ; C = 500
ADD C, 499 ; C = 999
SUB C, 99 ; C = 900
MUL C, 2 ; C = 1800
SET A, 0xFFFF ; C = 1800, A = 0xFFFF
SUB A, C ; C = 1800, A = 0xF8F8
SET C, A ; C = -1800, A = 0xF8F8
SET A, 0 ; C = -1800
MLI C, 2 ; C = -3600
DVI C, 3 ; C = -1200 (0xFB50)

0 comments on commit dae9b96

Please sign in to comment.