Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
[bits 16]
[org 0x7c00]
jmp Start
; Message Strap
msg db "Patricknet - Version: Beta 0.2 (15/9/2008)",13,10,0
Start:
xor ax,ax
mov dx,ax
mov es,ax
mov si,msg
call pd
pd:
mov ah,0x0E
mov bh,0x00
mov bx,0x07
pdc:
lodsb
or al,al
jz short pdend
int 0x10
jmp pdc
pdend:
retn ; return to caller
padding TIMEs 510-($-$$) db 0
;Flag Point Form Bios To Notice That This A Patricknet Boot Sector Is Vaild By Signature
Dw 0AA55h
Um.... What is meant to happen after the "call pd" instruction?
At the moment, it'll return from the "pd" routine just after the "call pd" instruction and keep executing. This means it'll execute the "pd" routine a second time (because that's what comes after the "call pd" instruction), and SI will be pointing to the byte after the "msg" string so it'll display your code as ASCII until it finds a second zero byte. When it does find that second zero byte the "pd" routine will try to return, but it wasn't actually called so there's no return address on the stack. At this point it might crash, lockup or do anything else.
You might want to insert something like this after the "call pd" instruction:
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Thanks. I use 3 computers to make it 1 is write and compile 1 used to write to floppy because my main computer doesn't have a floppy disk drive and the other to test it. By the way could it be that it only work emulated not on real hardware? that could be a possible. Plus how could i see it for my self on bochs?
if you put the floppy disk with Patricknet it into the computer with bochs on it, the script should work just like that (and run Patricknet, for that matter).
OS-LUX V0.0
Working on...
Memory management: the Pool
can you please give the link of the program just incase if want to do it from a with floppy image so other people can use it so i don't have to swap machines.