?? main.asm
字號:
;*****************start of the kernel code***************
[org 0x000]
[bits 16]
[SEGMENT .text]
;START #####################################################
mov ax, 0x0100 ;location where kernel is loaded
mov ds, ax
mov es, ax
cli
mov ss, ax ;stack segment
mov sp, 0xFFFF ;stack pointer at 64k limit
sti
push dx
push es
xor ax, ax
mov es, ax
cli
mov word [es:0x21*4], _int0x21 ; setup interrupt service
mov [es:0x21*4+2], cs
sti
pop es
pop dx
mov ah,00h
mov al,0ch
int 10h
mov si, strwelcome ; load message
mov al, 0x01 ; request sub-service 0x01
int 0x21
call _display_endl
call _disp_logo
call _shell ; call the shell
int 0x19 ; reboot
;END #######################################################
_int0x21:
_int0x21_ser0x01: ;service 0x01
cmp al, 0x01 ;see if service 0x01 wanted
jne _int0x21_end ;goto next check (now it is end)
_int0x21_ser0x01_start:
lodsb ; load next character
or al, al ; test for NUL character
jz _int0x21_ser0x01_end
mov ah, 0x0E ; BIOS teletype
mov bh, 0x00 ; display page 0
mov bl, 0x07 ; text attribute
int 0x10 ; invoke BIOS
jmp _int0x21_ser0x01_start
_int0x21_ser0x01_end:
jmp _int0x21_end
_int0x21_end:
iret
%include "graphics.asm"
%include "shell.asm"
%include "exec.asm"
%include "cpu.asm"
%include "data.inc"
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -