diff options
| author | Jan Tuomi <jan@jantuomi.fi> | 2025-03-01 23:09:16 +0200 |
|---|---|---|
| committer | Jan Tuomi <jan@jantuomi.fi> | 2025-03-01 23:10:30 +0200 |
| commit | 19ee6d36222bb288340d3d66f8773e259c49db2c (patch) | |
| tree | 2a01fb746138fa4a16a9fe869eaba14495270c57 /atk16_schasm/main.scm | |
| parent | 6da4534e2d73dccb9957a26485a75b0ed5eaacd8 (diff) | |
Implement deferred label eval for labels in 16-bit imm position
Diffstat (limited to 'atk16_schasm/main.scm')
| -rw-r--r-- | atk16_schasm/main.scm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/atk16_schasm/main.scm b/atk16_schasm/main.scm index abdf5d8..85e7bf2 100644 --- a/atk16_schasm/main.scm +++ b/atk16_schasm/main.scm @@ -22,11 +22,17 @@ (add R3 (u16 #xFF))) ;; abs jump -(ld PC (u16 (label 'main))) +(ld PC (label 'main)) ;; rel jump (add PC (i16 10)) +;; jump forward to a currently undefined label +(ld PC (label 'forward)) +(def-label 'forward + (hlt)) + +;; copy to register (mov R0 R1) ;; store string data in memory |
