mirror of
https://github.com/KarolS/millfork.git
synced 2024-09-27 12:57:41 +00:00
Fix #107 (syntax errors in stdlib, overpanicky statement preprocessor)
This commit is contained in:
parent
1e4a193741
commit
062483971a
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
// CHROUT. Write byte to default output. (If not screen, must call OPEN and CHKOUT beforehands.)
|
// CHROUT. Write byte to default output. (If not screen, must call OPEN and CHKOUT beforehands.)
|
||||||
// Input: A = Byte to write.
|
// Input: A = Byte to write.
|
||||||
asm void chrout(byte register(a) char) @$FFD2 !preserves_a !preserves_x !preserves_y extern
|
asm void chrout(byte register(a) char) !preserves_a !preserves_x !preserves_y @$FFD2 extern
|
||||||
|
|
||||||
asm void putchar(byte register(a) char) {
|
asm void putchar(byte register(a) char) {
|
||||||
JSR chrout
|
JSR chrout
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
// CHROUT. Write byte to default output. (If not screen, must call OPEN and CHKOUT beforehands.)
|
// CHROUT. Write byte to default output. (If not screen, must call OPEN and CHKOUT beforehands.)
|
||||||
// Input: A = Byte to write.
|
// Input: A = Byte to write.
|
||||||
asm void chrout(byte register(a) char) @$FFD2 !preserves_a !preserves_x !preserves_y extern
|
asm void chrout(byte register(a) char) !preserves_a !preserves_x !preserves_y @$FFD2 !preserves_a !preserves_x !preserves_y extern
|
||||||
|
|
||||||
asm void putchar(byte register(a) char) {
|
asm void putchar(byte register(a) char) {
|
||||||
JSR chrout
|
JSR chrout
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
// CHROUT. Write byte to default output. (If not screen, must call OPEN and CHKOUT beforehands.)
|
// CHROUT. Write byte to default output. (If not screen, must call OPEN and CHKOUT beforehands.)
|
||||||
// Input: A = Byte to write.
|
// Input: A = Byte to write.
|
||||||
asm void chrout(byte register(a) char) @$FFD2 !preserves_a !preserves_x !preserves_y extern
|
asm void chrout(byte register(a) char) !preserves_a !preserves_x !preserves_y @$FFD2 extern
|
||||||
|
|
||||||
// CHRIN. Read byte from default input (for keyboard, read a line from the screen). (If not keyboard, must call OPEN and CHKIN beforehands.)
|
// CHRIN. Read byte from default input (for keyboard, read a line from the screen). (If not keyboard, must call OPEN and CHKIN beforehands.)
|
||||||
// Output: A = Byte read.
|
// Output: A = Byte read.
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
// CHROUT. Write byte to default output. (If not screen, must call OPEN and CHKOUT beforehands.)
|
// CHROUT. Write byte to default output. (If not screen, must call OPEN and CHKOUT beforehands.)
|
||||||
// Input: A = Byte to write.
|
// Input: A = Byte to write.
|
||||||
asm void putchar(byte register(a) char) @$FFD2 !preserves_a !preserves_x !preserves_y extern
|
asm void putchar(byte register(a) char) !preserves_a !preserves_x !preserves_y @$FFD2 extern
|
||||||
|
|
||||||
inline void new_line() {
|
inline void new_line() {
|
||||||
putchar(13)
|
putchar(13)
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
// CHROUT. Write byte to default output. (If not screen, must call OPEN and CHKOUT beforehands.)
|
// CHROUT. Write byte to default output. (If not screen, must call OPEN and CHKOUT beforehands.)
|
||||||
// Input: A = Byte to write.
|
// Input: A = Byte to write.
|
||||||
asm void chrout(byte register(a) char) @$FFD2 !preserves_a !preserves_x !preserves_y extern
|
asm void chrout(byte register(a) char) !preserves_a !preserves_x !preserves_y @$FFD2 extern
|
||||||
|
|
||||||
asm void putchar(byte register(a) char) {
|
asm void putchar(byte register(a) char) {
|
||||||
JSR chrout
|
JSR chrout
|
||||||
|
@ -2802,7 +2802,7 @@ class Environment(val parent: Option[Environment], val prefix: String, val cpuFa
|
|||||||
def overlapsVariable(variable: String, expr: Expression): Boolean = {
|
def overlapsVariable(variable: String, expr: Expression): Boolean = {
|
||||||
if (eval(expr).isDefined) return false
|
if (eval(expr).isDefined) return false
|
||||||
if (expr.containsVariable(variable)) return true
|
if (expr.containsVariable(variable)) return true
|
||||||
val varRootName = get[Thing](variable).rootName
|
val varRootName = maybeGet[Thing](variable).getOrElse{return false}.rootName
|
||||||
if (varRootName == "?") return true
|
if (varRootName == "?") return true
|
||||||
if (varRootName == "") return false
|
if (varRootName == "") return false
|
||||||
overlapsVariableImpl(varRootName, expr)
|
overlapsVariableImpl(varRootName, expr)
|
||||||
|
Loading…
Reference in New Issue
Block a user