; ****************************************************************************
;
; BOOT.ASM
; ----------------------------------------------------------------------------
;
; RETRO UNIX 8086 (Retro Unix == Turkish Rational Unix)
; Operating System Project (v0.1) by ERDOGAN TAN (Beginning: 11/07/2012) 
; 1.44 MB Floppy Disk 
; Bootable Unix (RUFS) File System - Boot File
;
; [ Last Modification: 18/11/2012 ]
;
; ****************************************************************************

.8086

UNIXBOOT     SEGMENT PUBLIC 'CODE'
                assume cs:UNIXBOOT,ds:UNIXBOOT,es:UNIXBOOT,ss:UNIXBOOT

START_CODE:

proc_start      proc near
		
		mov si, offset BootMsg
		call UNIX_PRINTMSG

		xor ah, ah

		int 16h
		
		int 19h

proc_start     endp

UNIX_PRINTMSG     proc near
 
UNIX_PRINTMSG_LOOP:
                lodsb                           ; Load byte at DS:SI to AL
                and     AL,AL            
                jz      short UNIX_PRINTMSG_OK       
                mov     AH,0Eh                  
                mov     BX,07h             
                int     10h                     ; BIOS Service func ( ah ) = 0Eh
                                                ; Write char as TTY
                                                ;AL-char BH-page BL-color
                jmp     short UNIX_PRINTMSG_LOOP           

UNIX_PRINTMSG_OK:
                retn

UNIX_PRINTMSG     endp

;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
;  messages
;- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

BootMsg:
                db 'Retro UNIX 8086 v1'
                db 0Dh, 0Ah
                db 'Boot: '
                db 0Dh,0Ah, 0

bootfile_CopyRight:

                db  '(c) Erdogan TAN - 18/11/2012'

                db  1 dup (0)

              
UNIXBOOT     ends

                end     START_CODE
