2021-07-04 16:15:51 +00:00
|
|
|
cpu 8086
|
2021-06-30 17:35:07 +00:00
|
|
|
org 0x500
|
|
|
|
|
2021-07-04 20:35:27 +00:00
|
|
|
greet:
|
|
|
|
mov si, kernel_greeting
|
|
|
|
call printz
|
2021-07-04 16:15:51 +00:00
|
|
|
|
2021-07-04 20:35:27 +00:00
|
|
|
mov al, dl
|
|
|
|
add al, '0'
|
|
|
|
call printc
|
|
|
|
mov al, 10
|
|
|
|
call printc
|
|
|
|
|
|
|
|
memsize:
|
|
|
|
; Get and display memory size
|
|
|
|
int 0x12
|
|
|
|
mov bx, buffer
|
|
|
|
call itoa
|
|
|
|
|
|
|
|
mov si, bx
|
|
|
|
call printz
|
|
|
|
mov si, memsize_trailer
|
|
|
|
call printz
|
|
|
|
|
|
|
|
floppies:
|
|
|
|
; Get and display number of floppy disks
|
|
|
|
int 0x11
|
|
|
|
times 6 shr ax, 1
|
|
|
|
and ax, 3
|
|
|
|
inc ax
|
|
|
|
|
|
|
|
add al, '0'
|
|
|
|
call printc
|
|
|
|
|
|
|
|
mov si, floppies_trailer
|
|
|
|
call printz
|
2021-06-30 17:35:07 +00:00
|
|
|
|
|
|
|
hang:
|
|
|
|
hlt
|
|
|
|
jmp hang
|
2021-07-04 16:15:51 +00:00
|
|
|
|
2021-07-04 20:35:27 +00:00
|
|
|
%include "console.inc"
|
|
|
|
%include "printhex.inc"
|
|
|
|
%include "strint.inc"
|
|
|
|
|
|
|
|
kernel_greeting db "Nor86 kernel succesfully loaded", 10, "Loaded from disk ", 0
|
|
|
|
memsize_trailer db "k RAM", 10, 0
|
|
|
|
floppies_trailer db " floppy drive(s)", 10, 0
|
|
|
|
|
|
|
|
buffer times 256 db 0
|