diff --git a/data/fb.bas b/data/fb.bas new file mode 100644 index 0000000..4884acb --- /dev/null +++ b/data/fb.bas @@ -0,0 +1,9 @@ +FOR A = 1 TO 100 +PRINT A ; +B = A % 3 +C = A % 5 +IF B = 0 then PRINT "Fizz" ; +IF C = 0 then PRINT "Buzz" ; +PRINT "" +NEXT A +END diff --git a/data/hello.bas b/data/hello.bas index 9aa0273..5012fa4 100644 --- a/data/hello.bas +++ b/data/hello.bas @@ -1,5 +1,17 @@ -PRINT "What's your name?" -INPUT $1 -PRINT "Hello " ; -PRINT $1 +$1 = "_________" +A = & $1 +FOR X = 1 TO 9 +FOR Y = 1 TO 9 +PEEK B A +IF B = 95 THEN PRINT "_" ; +IF B = 88 THEN PRINT "X" ; +IF B = 79 THEN PRINT "O" ; +C = A % 3 +IF C = 0 THEN PRINT " " +A = A + 1 +NEXT Y +Z = X % 2 +IF Z = 0 THEN PRINT "You are X" +IF Z = 1 THEN PRINT "You are O" +NEXT X END diff --git a/source/kernel/features/keyboard.asm b/source/kernel/features/keyboard.asm index 18f75e2..ad5e112 100644 --- a/source/kernel/features/keyboard.asm +++ b/source/kernel/features/keyboard.asm @@ -57,8 +57,8 @@ keyboard_display_input: ret ; Return to the parent function (whatever that may be) .backspace: - call .move_cursor_back ; then .move_cursor_back - call .loop ; Else .loop + jmp .move_cursor_back ; then .move_cursor_back + jmp .loop ; Else .loop .move_cursor_back: mov ah, 0Eh @@ -71,7 +71,7 @@ keyboard_display_input: int 10h dec di - jmp keyboard_display_input + jmp .loop .print_current_input: ; Echo back that character and return the key inputing stosb