From c758888f1c87db6611074ea03288fca329999bc0 Mon Sep 17 00:00:00 2001 From: Yujian Zhang Date: Mon, 1 Oct 2018 14:08:06 +0800 Subject: [PATCH] For getchar, replace `jmp short` with `jmp near` due to large function. --- README.md | 3 +-- cc/keyboard.lisp | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0ad5def..6e7a5a1 100644 --- a/README.md +++ b/README.md @@ -129,8 +129,7 @@ and starts the emulator in fullscreen mode, as below (taking ``` Bochs header bar is not visible in full screen mode. Therefore one -needs to press `Shift` key to drop into the debug, or press -`Ctrl+Alt+q` to shutdown Yalo therefore quitting emulator. +needs to press `Ctrl+Alt+q` to shutdown Yalo therefore quitting emulator. Alternatively, one can modify the script files (e.g. removing `fullscreen` option or deleting the line containing `display_library` completely). diff --git a/cc/keyboard.lisp b/cc/keyboard.lisp index 0c548f3..faa4be5 100644 --- a/cc/keyboard.lisp +++ b/cc/keyboard.lisp @@ -214,7 +214,7 @@ (jnz .check-left-ctrl) (test dl dl) ;; Ignore the release of Capslock key. - (jnz .clear-key) + (jnz near .clear-key) ;; Toggle kbd-capslock-status between 0 and 1. (xor byte (kbd-capslock-status) 1) ;; We don't call function `turn-on-capslock-led' since at @@ -230,7 +230,7 @@ (mov (kbd-shift-status) dh) (xor dh (kbd-capslock-status)) (mov (kbd-to-upper-status) dh) - (jmp short .clear-key) + (jmp near .clear-key) .check-left-ctrl (cmp al kbd-left-ctrl) (jnz .check-right-ctrl) @@ -247,7 +247,7 @@ (mov dh (kbd-left-ctrl-status)) (or dh (kbd-right-ctrl-status)) (mov (kbd-ctrl-status) dh) - (jmp short .clear-key) + (jmp near .clear-key) .check-left-alt (cmp al kbd-left-alt) (jnz .check-right-alt) @@ -256,7 +256,7 @@ (jmp short .set-alt-status) .check-right-alt (cmp al kbd-right-alt) - (jnz .clear-key) + (jnz near .clear-key) (test dl dl) (setz (kbd-right-alt-status)) .set-alt-status @@ -264,7 +264,7 @@ (mov dh (kbd-left-alt-status)) (or dh (kbd-right-alt-status)) (mov (kbd-alt-status) dh) - (jmp short .clear-key) + (jmp near .clear-key) .shutdown-check ;; For BOCHS only. Check whether Ctrl-Alt-q is pressed. (mov dh (kbd-ctrl-status))