mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
@@ -81,7 +81,7 @@ void opt_Parse(char *s)
|
|||||||
|
|
||||||
case 'L':
|
case 'L':
|
||||||
if (s[1] == '\0')
|
if (s[1] == '\0')
|
||||||
opt_L(true);
|
opt_L(false);
|
||||||
else
|
else
|
||||||
error("Option 'L' does not take an argument\n");
|
error("Option 'L' does not take an argument\n");
|
||||||
break;
|
break;
|
||||||
@@ -97,7 +97,7 @@ void opt_Parse(char *s)
|
|||||||
switch (s[1]) {
|
switch (s[1]) {
|
||||||
case 'L':
|
case 'L':
|
||||||
if (s[2] == '\0')
|
if (s[2] == '\0')
|
||||||
opt_L(false);
|
opt_L(true);
|
||||||
else
|
else
|
||||||
error("Option '!L' does not take an argument\n");
|
error("Option '!L' does not take an argument\n");
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1946,14 +1946,14 @@ can be used to change some of the options during assembling from within the sour
|
|||||||
takes a comma-separated list of options as its argument:
|
takes a comma-separated list of options as its argument:
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
PUSHO
|
PUSHO
|
||||||
OPT g.oOX, Wdiv, !L ; acts like command-line -g.oOX -Wdiv and omitting -L
|
OPT g.oOX, Wdiv, L ; acts like command-line -g.oOX -Wdiv -L
|
||||||
DW `..ooOOXX ; uses the graphics constant characters from OPT g
|
DW `..ooOOXX ; uses the graphics constant characters from OPT g
|
||||||
PRINTLN $80000000/-1 ; prints a warning about division
|
PRINTLN $80000000/-1 ; prints a warning about division
|
||||||
LD [$FF88], A ; encoded as LD, not LDH
|
LD [$FF88], A ; encoded as LD, not LDH
|
||||||
POPO
|
POPO
|
||||||
DW `00112233 ; uses the default graphics constant characters
|
DW `00112233 ; uses the default graphics constant characters
|
||||||
PRINTLN $80000000/-1 ; no warning by default
|
PRINTLN $80000000/-1 ; no warning by default
|
||||||
LD [$FF88], A ; optimized to use LDH if -L was passed
|
LD [$FF88], A ; optimized to use LDH by default
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
The options that OPT can modify are currently:
|
The options that OPT can modify are currently:
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
SECTION "test", ROM0
|
SECTION "test", ROM0
|
||||||
|
|
||||||
|
opt !L ; already the default, but tests parsing "!L"
|
||||||
|
|
||||||
pusho
|
pusho
|
||||||
opt p42, !L, Wno-div
|
opt p42, L, Wno-div
|
||||||
ds 1
|
ds 1
|
||||||
ld [$ff88], a
|
ld [$ff88], a
|
||||||
println $8000_0000 / -1
|
println $8000_0000 / -1
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
warning: opt.asm(12): [-Wdiv]
|
warning: opt.asm(14): [-Wdiv]
|
||||||
Division of -2147483648 by -1 yields -2147483648
|
Division of -2147483648 by -1 yields -2147483648
|
||||||
|
|||||||
Reference in New Issue
Block a user