diff --git a/OutlawEditor/src/main/java/org/badvision/outlaweditor/apple/FillPattern.java b/OutlawEditor/src/main/java/org/badvision/outlaweditor/apple/FillPattern.java index b9ff4843..b4468003 100644 --- a/OutlawEditor/src/main/java/org/badvision/outlaweditor/apple/FillPattern.java +++ b/OutlawEditor/src/main/java/org/badvision/outlaweditor/apple/FillPattern.java @@ -101,11 +101,27 @@ public enum FillPattern { White_PC(false, 1, false, "+++++++"), White_Lo(true, 1, false, "+++++++"), White_Hi(true, 1, true, "+++++++"), - BW1(false, 4, false, + BW1_PC(false, 4, false, "++--++--++--++--++--++--++--", "--++--++--++--++--++--++--++" ), - BW2(false, 4, false, + BW1_Lo(true, 4, false, + "++--++--++--++--++--++--++--", + "--++--++--++--++--++--++--++" + ), + BW1_Hi(true, 4, true, + "++--++--++--++--++--++--++--", + "--++--++--++--++--++--++--++" + ), + BW2_PC(false, 4, false, + "--++--++--++--++--++--++--++", + "++--++--++--++--++--++--++--" + ), + BW2_Lo(true, 4, false, + "--++--++--++--++--++--++--++", + "++--++--++--++--++--++--++--" + ), + BW2_Hi(true, 4, true, "--++--++--++--++--++--++--++", "++--++--++--++--++--++--++--" ); diff --git a/Platform/Apple/tools/PLASMA/src/cmd.pla b/Platform/Apple/tools/PLASMA/src/cmd.pla old mode 100644 new mode 100755 index b44f91ac..d7490c52 --- a/Platform/Apple/tools/PLASMA/src/cmd.pla +++ b/Platform/Apple/tools/PLASMA/src/cmd.pla @@ -1075,6 +1075,9 @@ def loadmod(mod) else modend = init - defofst + defaddr fin + if fixup < 0 + perr = -fixup + fin else fixup = fixup & ~modinitkeep fin @@ -1264,7 +1267,7 @@ def execmod(modfile) ^lastsym = 0 systemflags = saveflags fin - return perr + return -perr end // // Get heap start. diff --git a/Platform/Apple/tools/PLASMA/src/cmdsys.plh b/Platform/Apple/tools/PLASMA/src/cmdsys.plh new file mode 100644 index 00000000..4928deda --- /dev/null +++ b/Platform/Apple/tools/PLASMA/src/cmdsys.plh @@ -0,0 +1,25 @@ +import cmdsys + predef putc, putln, puts, getc, gets + predef call, syscall + predef heapmark, heapallocallign, heapalloc, heaprelease, heapavail + predef memset, memcpy + predef isugt, isuge, isult, isule + predef modload, modexec, modaddr + word MACHID, sysvars + // + // System flags: memory allocator screen holes. + // + const restxt1 = $0001 + const restxt2 = $0002 + const resxtxt1 = $0004 + const resxtxt2 = $0008 + const reshgr1 = $0010 + const reshgr2 = $0020 + const resxhgr1 = $0040 + const resxhgr2 = $0080 + // + // Module don't free memory + // + const modkeep = $2000 + const modinitkeep = $4000 +end diff --git a/Platform/Apple/tools/PLASMA/src/codegen.c b/Platform/Apple/tools/PLASMA/src/codegen.c index 17e9fb0f..c9225718 100755 --- a/Platform/Apple/tools/PLASMA/src/codegen.c +++ b/Platform/Apple/tools/PLASMA/src/codegen.c @@ -14,7 +14,7 @@ static int locals = 0; static int predefs = 0; static int defs = 0; static int asmdefs = 0; -static int codetags = 0; +static int codetags = 1; // Fix check for break_tag and cont_tag static int fixups = 0; static char idconst_name[1024][17]; static int idconst_value[1024]; diff --git a/Platform/Apple/tools/PLASMA/src/lex.c b/Platform/Apple/tools/PLASMA/src/lex.c index ff6c8fbc..d46e902a 100755 --- a/Platform/Apple/tools/PLASMA/src/lex.c +++ b/Platform/Apple/tools/PLASMA/src/lex.c @@ -168,7 +168,7 @@ t_token scan(void) constval = 0x0D; break; case 'r': - constval = '\r'; + constval = 0x0A; break; case 't': constval = '\t'; @@ -212,7 +212,7 @@ t_token scan(void) *scanpos = 0x0D; break; case 'r': - *scanpos = '\r'; + *scanpos = 0x0A; break; case 't': *scanpos = '\t';