
; Copyright 2004-2005 Christopher Evans
; email:   tekno1911@yahoo.com
; Website: http://nxdos.sourceforge.net/
;                                                                           ;
;       This program is copyrighted, but may be freely distributed          ;
;       under the terms of the Free Software Foundation's GNU General       ;
;       Public License v2 (or later.)  See the file COPYING for the         ;
;       legalities.  If you did not receive a copy of COPYING, you          ;
;       may request one from the Free Software Foundation, Inc.,            ;
;       59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.           ;
;       ABSOLUTELY NO WARRANTY -- use it at your own risk!                  ;
;                                                                           ;

code            segment byte public
                assume  cs:code, ds:code
		org	100h
readb           proc    far

start:          jmp     initialize
include         \nxdos\src\toolbox.asm
                _compile
initialize:
                push  cs
                pop   es

                mov   ah,0
                mov   dl,0                   
                int   13h

                mov   ah,2                   
                mov   al,1 
                mov   cx,1                   
                mov   dx,0
                mov   bx,offset readbuffer
                int   13h

                _print message, 1
                _fopen filename, 1, 0, 0
                mov  filehandle, ax
                _fwrite filehandle, readbuffer, 512
                _fclose filehandle
                _newline

exitptr:        call dosexit
                int 20h      

readb           endp

filehandle      dw ?
message         db 'Writing 512 bytes to '
filename        db 'BOOTSECT.BSS',0
readbuffer      db      0

code            ends

ProgramEnd      EQU $-01h

		end	start
