Assembler to produce PXE NBP
From: Aubrey McIntosh (mcintosh_at_spam04.vima.austin.tx.us)
Date: 05/31/04
- Next message: T.M. Sommers: "Re: The Public Domain"
- Previous message: Scott Moore: "Re: No need to optimize in assembly anymore"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 May 2004 12:12:50 -0700
I desire to load a system in a PXE environment. I have sources for a
working boot file using turbo assembler syntax, most or all of the
other relevant sources, old experience writing device drivers in the
DOS environment. I have deep experience with the desired system. I
have the PXE 2.1 specification. I have a working net boot
environment. I am confident I could produce a working file assembling
one line at a time with "debug."
Alas, my copy of MS MASM is missing. I downloaded Steve Hutchesson's
MASM32 yesterday and spent several hours reading the docs. I'm
pleased to see he hangs out here.
(One thing that I noticed is that the INC2L program invoked in the
install seems to hang while dealing with the creating adme.lib and
adme.exp. My task monitor thinks it has spent 3 hours 43 minutes of
machine time so far, surely this is wrong. My system is a Dell
OptiPlex GX1 about 233 MHz using Win 2000. I have a drive x: and no
drive C: for obscure, idiosyncratic, entrenched, and brilliant or
paranoid reasons.)
Proceeding by milestones of correct working code then refinement, I
planned a first piece of code that would just announce itself on the
console, then let the system continue to boot. The current source
code should do that, except for issuing the correct return codes at
entry "Tidy:" Later refinements would provide verify/debug
information matching the PXE specifications to the actual target
machine.
You may remember that the NBP loads at 0:7c00 in real mode, and looks
significantly like the boot sector of a disk drive. So my task is to
make a .COM (or .SYS) file that will execute correctly at 0:7c00
The following source doesn't assemble. The error messages
nbp_01.asm(29) : error A2008: syntax error : moV
don't really help me that much. N.B. that the letters are capitalized
uniquely in each mov statement, and that the connection between the
line number and the mnemonic cited is hard to visualize.
Thoughts? Other freely available assemblers?
-- Aubrey
;-----------------------------------------------------------------------
; © 2004 by Aubrey McIntosh, Ph.D.
; May 31, 2004
; Effort toward Oberon aware Network Boot Program for PXE environment.
; See pxespec.pdf (Preboot Execution Specification 2.1, Sept. 20,
1999, Intel Corp.
; Permission granted to distribute as part of Oberon and derivative
systems.
;
; This acts just like the legacy 0:7c00 disk boot sectors.
; Phase 1. "Hello world"
;-----------------------------------------------------------------------
.listall
.model Tiny
.code
assume ds:_DATA
jmp start
hello0 db 'OBERON',0 ; 03 OEM id
hellop dw offset hello0
; From the Oberon Boot Loader.
; write - write character / mark - write next mark
; in: al=char / in: none
; mod: none / mod: ax,bx
;In various versions, mark has been a PROC, it has had a PROTO
statement.
; It has had an ENDP either before or including write.
mark:
Mov bx,word ptr [hellop]
inc word ptr [hellop]
mOv al,byte ptr [bx]
; FALL-THROUGH
write:
push bx
push ax
moV ah,14
MoV bx,7
int 10h
pop bx
pop ax
ret
start:
call mark
call mark
call mark
call mark
call mark
call mark
;-----------------------------------------------------------------------
;Continue as if PXE had not succeeded.
tidy:
ret far
end
- Next message: T.M. Sommers: "Re: The Public Domain"
- Previous message: Scott Moore: "Re: No need to optimize in assembly anymore"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|