Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed, and improved #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions TESTS/high-nerd.dasm16
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
;
; A: 0x0000 [A]:
; B: 0x0000 [B]:
; C: 0xFB50 [C]:
; C: 0xFB4F [C]:
; X: 0x0000 [X]:
; Y: 0x0000 [Y]:
; Z: 0x0000 [Z]:
Expand All @@ -21,13 +21,13 @@
; 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)
SET C, 500 ; C = 0500(0x01F4)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The leading zero in comments may cause confusion with octal numbers

ADD C, 499 ; C = 0999(0x03E7)
SUB C, 99 ; C = 0900(0x0384)
MUL C, 2 ; C = 1800(0x0708)
SET A, 0xFFFF ; C = 1800(0x0708), A = 0xFFFF
SUB A, C ; C = 1800(0x0708), A = 0xF8F7
SET C, A ; C = -1800(0xF8F7), A = 0xF8F7
SET A, 0 ; C = -1800(0xF8F7)
MLI C, 2 ; C = -3600(0xF1EE), Ex = 0xFFFF
DVI C, 3 ; C = -1200(0xFB4F), Ex = 0x5556