add mouse support (WIP)
This commit is contained in:
parent
892da28db7
commit
91881695fb
10 changed files with 719 additions and 161 deletions
|
|
@ -2,7 +2,6 @@
|
|||
; Project : Custom BIOS / ROM
|
||||
; File : generic.asm
|
||||
; Author : frater
|
||||
; Created : 06 jan 2026
|
||||
;
|
||||
; License : GNU General Public License v3.0 or later (GPL-3.0+)
|
||||
;
|
||||
|
|
@ -23,7 +22,7 @@
|
|||
|
||||
; ---------------------------------------------------------------------------
|
||||
; Détection RAM conventionnelle
|
||||
; Teste la RAM de MEM_SEG_DEB jusqu’à 0xA000 (640KB), par pas de 1KB.
|
||||
; Teste la RAM de MEM_SEG_DEB -> MEM_SEG_END (0xA000, 640KB), par pas de 1KB.
|
||||
; Méthode: sauvegarde 1 mot, écrit 2 patterns, relit, restaure.
|
||||
;
|
||||
; Résultats:
|
||||
|
|
@ -33,9 +32,9 @@
|
|||
; Précautions:
|
||||
; - Ne testez PAS une zone où se trouve votre pile / variables.
|
||||
; - Si votre pile est à 0000:7C00 (phys 0x7C00), commencez au moins à 0x0800.
|
||||
; - Ne testez pas au-delà de 0xA000 (début VGA/vidéo).
|
||||
; - Ne testez pas au-delà de MEM_SEG_END (0xA000: début VGA/vidéo).
|
||||
; ---------------------------------------------------------------------------
|
||||
setup_ram:
|
||||
ram_setup:
|
||||
xor ax, ax ; AX = compteur KB trouvés
|
||||
mov dx, MEM_SEG_DEB ; DX = segment courant testé
|
||||
mov cx, MEM_SEG_END ; CX = segment fin (exclu)
|
||||
|
|
@ -155,7 +154,7 @@ setup_check_vga:
|
|||
; ---------------------------------------------------------------------------
|
||||
; IVT install (8088, mode réel) - remplit les 256 vecteurs avec un handler IRET
|
||||
; ---------------------------------------------------------------------------
|
||||
setup_ivt:
|
||||
ivt_setup:
|
||||
; installation de la table d'interrupts
|
||||
xor ax, ax
|
||||
mov es, ax ; ES = 0000h -> base IVT
|
||||
|
|
@ -177,11 +176,11 @@ setup_ivt:
|
|||
; ---------------------------------------------------------------------------
|
||||
; IVT install (8088, mode réel) - installe un handler a une interrupt calculée
|
||||
;
|
||||
; ax = int ide
|
||||
; ax = int id
|
||||
; dx = segment handler
|
||||
; bx = offset handler
|
||||
; ---------------------------------------------------------------------------
|
||||
setup_setvector:
|
||||
ivt_setvector:
|
||||
push es
|
||||
push di
|
||||
|
||||
|
|
@ -192,9 +191,11 @@ setup_setvector:
|
|||
mov es, ax ; ES = 0000h -> base IVT
|
||||
|
||||
mov ax, bx ; offset du handler
|
||||
cli
|
||||
stosw ; write offset (AX) -> [ES:DI], DI += 2
|
||||
xchg ax, dx ; AX = segment, DX = offset
|
||||
stosw ; write segment (AX) -> [ES:DI], DI += 2
|
||||
sti
|
||||
|
||||
pop di
|
||||
pop es
|
||||
|
|
|
|||
45
src/services/macros.asm
Normal file
45
src/services/macros.asm
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
; =============================================================================
|
||||
; Project : Custom BIOS / ROM
|
||||
; File : macros.asm
|
||||
; Author : frater
|
||||
;
|
||||
; License : GNU General Public License v3.0 or later (GPL-3.0+)
|
||||
;
|
||||
; This program is free software: you can redistribute it and/or modify
|
||||
; it under the terms of the GNU General Public License as published by
|
||||
; the Free Software Foundation, either version 3 of the License, or
|
||||
; (at your option) any later version.
|
||||
;
|
||||
; This program is distributed in the hope that it will be useful,
|
||||
; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
; GNU General Public License for more details.
|
||||
;
|
||||
; You should have received a copy of the GNU General Public License
|
||||
; along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
;
|
||||
; =============================================================================
|
||||
|
||||
%macro PUSH_ABCD 0
|
||||
push ax
|
||||
push bx
|
||||
push cx
|
||||
push dx
|
||||
%endmacro
|
||||
|
||||
%macro PUSH_ID 0
|
||||
push di
|
||||
push si
|
||||
%endmacro
|
||||
|
||||
%macro POP_ABCD 0
|
||||
pop dx
|
||||
pop cx
|
||||
pop bx
|
||||
pop ax
|
||||
%endmacro
|
||||
|
||||
%macro POP_ID 0
|
||||
pop si
|
||||
pop di
|
||||
%endmacro
|
||||
Loading…
Reference in a new issue