Allow OPT to modify -W

Warning flags are processed individually;
PUSHO and POPO (re)store all the warning states.
This commit is contained in:
Rangi
2021-03-15 10:30:40 -04:00
committed by Eldred Habert
parent 2c30ab8731
commit d43408f4f3
8 changed files with 52 additions and 17 deletions

View File

@@ -1883,18 +1883,20 @@ 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:
.Bd -literal -offset indent
PUSHO
OPT g.oOX, !L ; acts like command-line -g.oOX and omitting -L
DW `..ooOOXX ; uses the graphics constant characters from OPT g
LD [$FF88], A ; encoded as LD, not LDH
OPT g.oOX, Wdiv, !L ; acts like command-line -g.oOX -Wdiv and omitting -L
DW `..ooOOXX ; uses the graphics constant characters from OPT g
PRINTLN $80000000/-1 ; prints a warning about division
LD [$FF88], A ; encoded as LD, not LDH
POPO
DW `00112233 ; uses the default graphics constant characters
LD [$FF88], A ; optimized to use LDH if -L was passed
DW `00112233 ; uses the default graphics constant characters
PRINTLN $80000000/-1 ; no warning by default
LD [$FF88], A ; optimized to use LDH if -L was passed
.Ed
.Pp
The options that OPT can modify are currently:
.Cm b , g , p ,
.Cm b , g , p , L ,
and
.Cm L .
.Cm W .
The Boolean flag option
.Cm L
can be specified as