Author Topic: Zorm's OS  (Read 4496 times)

0 Members and 1 Guest are viewing this topic.

Offline zorm

  • Hero Member
  • *****
  • Posts: 591
    • View Profile
    • Zorm's Page
Zorm's OS
« on: June 18, 2005, 04:35:04 am »
So I reread lots of stuff about OS Development and started coding.

Code: [Select]
use16
org 0x7C00

beginning:
cli ;disable interrupts
xor ax, ax
mov ds, ax
mov es, ax
mov fs, ax
mov sp, 0x0fff0 ;Setup stack

;set 320x200 Color display mode
mov ax, 4
int 10h

push 21
push loadingString
call putString

hang:
jmp hang

putString:
mov bp, sp
mov dh, 1 ;row
mov dl, 0 ;column
mov al, 1 ;mode
mov bl, 0x07 ;display attribute
mov ah, 0x13 ;Write String
mov cx, [bp+4] ;String length
mov bp, [bp+2] ;String
int 0x10
retn

loadingString db 'Zorms OS Loading...', 13, 10

emptySpace = 510 - ($ - $$) ;Can be $$ or beginning
times emptySpace db 0
dw 0xAA55

Tested in Bochs it just prints a message right now and yes I realize putString clobbers stack and such but ill fix that later.

Edit:
I should point out this is for FASM as thats what im using.
"Frustra fit per plura quod potest fieri per pauciora"
- William of Ockham