diff --git a/README.markdown b/README.markdown index 9869421..e5d8641 100644 --- a/README.markdown +++ b/README.markdown @@ -180,4 +180,6 @@ TODO * Character tables ("strings" to everybody else) * Work out the analyses again and document them * Addressing modes; rename instructions to match -* fix jmp (vector) syntax +* `jsr (vector)` +* `jmp routine` +* insist on EOL after each instruction. need spacesWOEOL production diff --git a/doc/Checking.markdown b/doc/Checking.markdown index 899fe48..a16a588 100644 --- a/doc/Checking.markdown +++ b/doc/Checking.markdown @@ -142,27 +142,27 @@ No duplicate routine names, including externals. | } ? duplicate routine name -We can jump to a vector. +We can jump indirectly through a vector. | reserve vector blah | routine main { - | jmp blah + | jmp (blah) | } = True -We can't jump to a word. +We can't jump indirectly through a word. | reserve word blah | routine main { - | jmp blah + | jmp (blah) | } ? jmp to non-vector -We can't jump to a byte. +We can't jump indirectly through a byte. | assign byte screen 1024 | routine main { - | jmp screen + | jmp (screen) | } ? jmp to non-vector diff --git a/doc/Emitting.markdown b/doc/Emitting.markdown index c2fd43f..8ddc47e 100644 --- a/doc/Emitting.markdown +++ b/doc/Emitting.markdown @@ -111,7 +111,7 @@ Installing an interrupt handler (at the Kernal level, i.e. with CINV) | | routine our_cinv { | inc screen - | jmp save_cinv + | jmp (save_cinv) | } = main: = sei diff --git a/eg/char_actor_demo.60p b/eg/char_actor_demo.60p deleted file mode 100644 index bd6e3a7..0000000 --- a/eg/char_actor_demo.60p +++ /dev/null @@ -1,4 +0,0 @@ -assign byte table screen 1024 - -assign byte table actor_x 49152 -assign byte table actor_x 49152 diff --git a/eg/cinv.60pical b/eg/cinv.60p similarity index 91% rename from eg/cinv.60pical rename to eg/cinv.60p index 4d9ab6c..44b0072 100644 --- a/eg/cinv.60pical +++ b/eg/cinv.60p @@ -11,5 +11,5 @@ routine main { routine our_cinv { inc screen - jmp save_cinv + jmp (save_cinv) } diff --git a/eg/compare.60pical b/eg/compare.60pical deleted file mode 100644 index 2c7bbd7..0000000 --- a/eg/compare.60pical +++ /dev/null @@ -1,24 +0,0 @@ -reserve byte m_high -reserve byte m_low -reserve byte n_high -reserve byte n_low - -routine compare_16_bit { - lda m_high - cmp n_high - if beq { - lda m_low - cmp n_low - } else { - } -} - -routine compare_16_bit { - lda >m - cmp >n - if beq { - lda