Einzelnen Beitrag anzeigen

Go2EITS

Registriert seit: 25. Jun 2006
519 Beiträge
 
Delphi 7 Personal
 
#11

Re: bootsektor schreiben

  Alt 3. Okt 2006, 12:44
Zitat:
The memory problem
------------------
There is a memory problem.
As I've written bootstraps are always loaded to address
07C00. We don't know what segment and offset the BIOS has
put us in. The segment can be anything between 0000 and
07C0. This is a problem when we want to use variables.
The solution is simple. Begin your bootstrap by jumping
to your bootstrap, but jump to a known segment.

Here is an example:

; JUMP.ASM
; Make a jump and then hang

; Tell the compiler that this is offset 0.
; It isn't offset 0, but it will be after the jump.
[ORG 0]

jmp 07C0h:start ; Goto segment 07C0

start:
; Update the segment registers
mov ax, cs
mov ds, ax
mov es, ax

hang: ; Hang!
jmp hang

times 510-($-$$) db 0
dw 0AA55h

If you compile and test this bootstrap, there will be no
visible difference to the minimal bootstrap presented
earlier. The computer will just hang.
"We don't know what segment and offset the BIOS has put us in."
Heißt: Wir wissen nicht welches Segment bzw. Offset uns das Bios zuweist. Daher der Sprung.

Im übrigen würde ich mal das Tutorial von vorne beginnen, so wie es dasteht. Und Du weißt auch,
dass der Computer nach der Ausführung 'hängt': "The computer will just hang."

Ich schlage vor, Du benutzt mal Leo.org für die Englischkenntnisse und schaust, ob Du die Beispiele von vorne schaffst.

[Roter Kasten] Na dann ist ja gut! Waren meine Experimente mit Assembler vor 10 Jahren doch nicht umsonst.
Beste Grüße Go2EITS
  Mit Zitat antworten Zitat