Re: paper tape bootstraps




<ArarghMail108NOSPAM@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:jmsi671t2tu7ol09t3v7advvh8t5bfefbg@xxxxxxxxxx

CS & IP, which are usually 0000 & 7C00. If not, some MBRs or boot
sectors may not work correctly.

I allow for that by doing a jmp far 0000:<next loc> which sets CS to
what I expect, assuming that I was actually loaded at 0:7C00. :-)

As long as you don't use the CS: override, it really doesn't
matter what the CS:IP contents are (within reason*).

If you don't use anything like:

push cs
pop ds

mov ax,cs
mov dx,ax

mov ax,cs:[some_var]

then you don't have to do the 'jmp far' to set CS.

But I am sure you already knew this. :-)

Thanks,
Ben

*As long as IP <= 0xFE00. However, you can't get a physical
pointer to 0x07C00 with IP > 0x7C00 anyway. :-)

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Forever Young Software
http://www.fysnet.net/index.htm
http://www.fysnet.net/collections.htm
To reply by email, please remove the zzzzzz's

Batteries not included, some assembly required.

.



Relevant Pages

  • Re: paper tape bootstraps
    ... sectors may not work correctly. ... I allow for that by doing a jmp far 0000:<next loc> which sets CS to ... mov ax,cs ...
    (comp.lang.asm.x86)
  • [2] Lock-free questions ...
    ... {$IFDEF FreePascal} ... MOV EDI, sNum32 ... JMP @@EXIT; ... JMP @@EXIT ...
    (comp.programming.threads)
  • Re: 8031 question
    ... AUXBUF EQU 0; TRICK - BAFER ... BUFFER EQU 100H; PREPARE FOR OUTPUT ... MOV R0,#TEMPDIV; TEMPERATURU CITA SAMO U KRUGU 1 ... JMP EQSEC; ...
    (sci.electronics.design)
  • Skybucks Big CircleV1
    ... ;author Skybuck Flying ... ;strategy Trying to stay alive with literally a circle of jumps ... mov 50, 3165 ... jmp 511 ...
    (rec.games.corewar)
  • Skybucks CircleV1
    ... A fun bot/warrior which literally circles around on a circle of jumps ... ;author Skybuck Flying ... mov 50, 2879 ... jmp 255 ...
    (rec.games.corewar)