8,7 → 8,7 |
MODULE Compiler; |
|
IMPORT ST := STATEMENTS, PARS, UTILS, PATHS, PROG, C := CONSOLE, |
ERRORS, STRINGS, WRITER, MSP430, THUMB, TARGETS; |
ERRORS, STRINGS, WRITER, MSP430, THUMB, TARGETS, SCAN; |
|
|
PROCEDURE keys (VAR options: PROG.OPTIONS; VAR out: PARS.PATH); |
15,7 → 15,7 |
VAR |
param: PARS.PATH; |
i, j: INTEGER; |
end: BOOLEAN; |
_end: BOOLEAN; |
value: INTEGER; |
minor, |
major: INTEGER; |
24,7 → 24,7 |
BEGIN |
out := ""; |
checking := options.checking; |
end := FALSE; |
_end := FALSE; |
i := 3; |
REPEAT |
UTILS.GetArg(i, param); |
113,11 → 113,19 |
DEC(i) |
END |
|
ELSIF param = "-lower" THEN |
options.lower := TRUE |
|
ELSIF param = "-pic" THEN |
options.pic := TRUE |
|
ELSIF param = "-def" THEN |
INC(i); |
UTILS.GetArg(i, param); |
SCAN.NewDef(param) |
|
ELSIF param = "" THEN |
end := TRUE |
_end := TRUE |
|
ELSE |
ERRORS.BadParam(param) |
124,7 → 132,7 |
END; |
|
INC(i) |
UNTIL end; |
UNTIL _end; |
|
options.checking := checking |
END keys; |
165,6 → 173,7 |
options.stack := 2; |
options.version := 65536; |
options.pic := FALSE; |
options.lower := FALSE; |
options.checking := ST.chkALL; |
|
PATHS.GetCurrentDirectory(app_path); |
203,6 → 212,8 |
C.StringLn(" -stk <size> set size of stack in Mbytes (Windows, Linux, KolibriOS)"); C.Ln; |
C.StringLn(" -nochk <'ptibcwra'> disable runtime checking (pointers, types, indexes,"); |
C.StringLn(" BYTE, CHR, WCHR)"); C.Ln; |
C.StringLn(" -lower allow lower case for keywords"); C.Ln; |
C.StringLn(" -def <identifier> define conditional compilation symbol"); C.Ln; |
C.StringLn(" -ver <major.minor> set version of program (KolibriOS DLL)"); C.Ln; |
C.StringLn(" -ram <size> set size of RAM in bytes (MSP430) or Kbytes (STM32)"); C.Ln; |
C.StringLn(" -rom <size> set size of ROM in bytes (MSP430) or Kbytes (STM32)"); C.Ln; |
226,6 → 237,8 |
ERRORS.Error(205) |
END; |
|
SCAN.NewDef(param); |
|
IF TARGETS.Select(param) THEN |
target := TARGETS.target |
ELSE |