X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=bootstrap.asm;h=1b8b65862947102c2c9117ae73eaf2890219d322;hb=a0c4c60159c79c8d9af3d08e01bacfa354232c3b;hp=4dd77de2152879f910f50efb7638369afe2c4382;hpb=11d153e11d9f291d592cfbe5363aea911f0bb46f;p=rrq%2Fjonasforth.git diff --git a/bootstrap.asm b/bootstrap.asm index 4dd77de..1b8b658 100644 --- a/bootstrap.asm +++ b/bootstrap.asm @@ -111,20 +111,13 @@ forth INTERPRET_STRING, 'INTERPRET-STRING' ;; Check if the buffer is-non-empty ;; [TODO] This probably won't work for strings with whitespace at the end. dq INPUT_LENGTH, GET - dq ZBRANCH, 8 * 19 ; to EXIT + dq ZBRANCH, 8 * 5 ; to EXIT - dq INPUT_BUFFER, GET - dq INPUT_LENGTH, GET - dq POP_WORD - - ;; Stack is (buffer buffer-length word word-length) - - dq ROT, ROT - dq INPUT_LENGTH, PUT - dq ROT, ROT - dq INPUT_BUFFER, PUT + dq READ_WORD dq INTERPRET_WORD - dq BRANCH, -8 * 19 ; to INPUT-LENGTH @ + dq BRANCH, -8 * 7 ; to INPUT-LENGTH @ + + dq LIT, 0, INPUT_BUFFER, PUT dq EXIT