diff options
author | unknown <David@FAMILY.(none)> | 2012-10-01 17:28:01 +1300 |
---|---|---|
committer | unknown <David@FAMILY.(none)> | 2012-10-01 17:28:01 +1300 |
commit | 52c86bd6941b210dfdaba1c7852e6eb49b7899b2 (patch) | |
tree | b0fa2b82660caa836170f12ab98e5061a32beaac /jasposkernel.asm | |
download | jaspos-52c86bd6941b210dfdaba1c7852e6eb49b7899b2.tar.xz |
Initial commit
Diffstat (limited to 'jasposkernel.asm')
-rw-r--r-- | jasposkernel.asm | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/jasposkernel.asm b/jasposkernel.asm new file mode 100644 index 0000000..ccc7dbc --- /dev/null +++ b/jasposkernel.asm @@ -0,0 +1,73 @@ +Entry: + mov ax, cs + mov ds, ax + mov es, ax + mov ss, ax + ;mov esp, 0x7FFFF + mov sp, 0xFFFE + call ClearScreen ; Clear the screen + mov [Drive], dl ; Get the drive we booted from before we go and mess with dl + + push msgJasposSplash ; + call OutText ; + + call GetKey ; + call diskio_ResetDiskSystem + call diskio_ResetDiskSystem + call diskio_ResetDiskSystem + call diskio_DumpBootSector + call GetKey + call apm_ConnectInterface ; + call apm_PowerOff ; + jmp short Halt + +GetKey: + xor ax, ax ; Zero-out EAX + int 0x16 ; Int 16.00 - wait for keypress + ret ; Return + +Halt: + xor ax, ax ; Zero-out AX + int 0x16 ; Int 16.00 - wait for keypress + jmp Halt ; Loop + +ClearNumberBuffer: + push cx ; Push the registers we'll be messing with + push ax ; + push di ; + mov al, '0' ; AL = "0" - char to fill buffer with + mov cx, 5 ; write 0 six times + mov di, NumberBuffer ; Destination is NumberBuffer + rep stosb ; Store the byte AL CX times + pop di ; Pop our regisers back off the stack + pop ax ; + pop cx ; + ret + +ShowFiles: + pop ax + pop si + push ax + cld + mov di, diskio_SectorBuffer + mov cx, 16 + rep movsb + + push msgFile + call OutText + push diskio_SectorBuffer + call OutText + + mov di, diskio_SectorBuffer + mov cx, 16 + rep movsb + push msgAuthor + call OutText + push diskio_SectorBuffer + call OutText + ret + +%include "Kernel/textvga.asm" +%include "Kernel/apm.asm" +%include "Kernel/strings.asm" +%include "Kernel/diskio.asm"
\ No newline at end of file |