mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-25 04:22:07 +00:00
Add syntax to push and modify stacks in one line (#1421)
This commit is contained in:
@@ -4,3 +4,4 @@ opt p1234
|
||||
opt Q1234
|
||||
opt Q32
|
||||
opt W
|
||||
opt
|
||||
|
||||
@@ -10,4 +10,6 @@ error: invalid-opt.asm(5):
|
||||
Argument for option 'Q' must be between 1 and 31
|
||||
error: invalid-opt.asm(6):
|
||||
Must specify an argument for option 'W'
|
||||
error: Assembly aborted (6 errors)!
|
||||
error: invalid-opt.asm(7):
|
||||
syntax error, unexpected newline, expecting string
|
||||
error: Assembly aborted (7 errors)!
|
||||
|
||||
@@ -20,6 +20,11 @@ MACRO push_
|
||||
pushc
|
||||
ENDM
|
||||
|
||||
MACRO push_set_
|
||||
println "pushc \1"
|
||||
pushc \1
|
||||
ENDM
|
||||
|
||||
MACRO pop_
|
||||
println "popc"
|
||||
popc
|
||||
@@ -83,9 +88,8 @@ charmap "ef", $3
|
||||
|
||||
push_
|
||||
set_ map2
|
||||
push_
|
||||
|
||||
set_ map3
|
||||
push_set_ map3
|
||||
|
||||
print_mapped "ab"
|
||||
print_mapped "cd"
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
warning: multiple-charmaps.asm(41) -> multiple-charmaps.asm::print_mapped(29): [-Wnumeric-string]
|
||||
warning: multiple-charmaps.asm(46) -> multiple-charmaps.asm::print_mapped(34): [-Wnumeric-string]
|
||||
Treating 2-character string as a number
|
||||
warning: multiple-charmaps.asm(49) -> multiple-charmaps.asm::print_mapped(29): [-Wnumeric-string]
|
||||
warning: multiple-charmaps.asm(54) -> multiple-charmaps.asm::print_mapped(34): [-Wnumeric-string]
|
||||
Treating 2-character string as a number
|
||||
warning: multiple-charmaps.asm(68) -> multiple-charmaps.asm::print_mapped(29): [-Wnumeric-string]
|
||||
warning: multiple-charmaps.asm(73) -> multiple-charmaps.asm::print_mapped(34): [-Wnumeric-string]
|
||||
Treating 2-character string as a number
|
||||
warning: multiple-charmaps.asm(91) -> multiple-charmaps.asm::print_mapped(29): [-Wnumeric-string]
|
||||
warning: multiple-charmaps.asm(95) -> multiple-charmaps.asm::print_mapped(34): [-Wnumeric-string]
|
||||
Treating 2-character string as a number
|
||||
warning: multiple-charmaps.asm(92) -> multiple-charmaps.asm::print_mapped(29): [-Wnumeric-string]
|
||||
warning: multiple-charmaps.asm(96) -> multiple-charmaps.asm::print_mapped(34): [-Wnumeric-string]
|
||||
Treating 2-character string as a number
|
||||
warning: multiple-charmaps.asm(100) -> multiple-charmaps.asm::print_mapped(29): [-Wnumeric-string]
|
||||
warning: multiple-charmaps.asm(104) -> multiple-charmaps.asm::print_mapped(34): [-Wnumeric-string]
|
||||
Treating 2-character string as a number
|
||||
error: multiple-charmaps.asm(102) -> multiple-charmaps.asm::new_(9):
|
||||
error: multiple-charmaps.asm(106) -> multiple-charmaps.asm::new_(9):
|
||||
Charmap 'map1' already exists
|
||||
error: multiple-charmaps.asm(104) -> multiple-charmaps.asm::set_(15):
|
||||
error: multiple-charmaps.asm(108) -> multiple-charmaps.asm::set_(15):
|
||||
Charmap 'map5' doesn't exist
|
||||
error: multiple-charmaps.asm(106) -> multiple-charmaps.asm::pop_(25):
|
||||
error: multiple-charmaps.asm(110) -> multiple-charmaps.asm::pop_(30):
|
||||
No entries in the charmap stack
|
||||
error: Assembly aborted (3 errors)!
|
||||
|
||||
@@ -22,8 +22,7 @@ $3
|
||||
setcharmap map1
|
||||
pushc
|
||||
setcharmap map2
|
||||
pushc
|
||||
setcharmap map3
|
||||
pushc map3
|
||||
$1
|
||||
$6364
|
||||
$6566
|
||||
|
||||
@@ -12,3 +12,7 @@ popo
|
||||
println $8000_0000 / -1
|
||||
def n = 3.14
|
||||
println "{x:n} = {f:n}"
|
||||
|
||||
pusho p99
|
||||
ds 1
|
||||
popo
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user