From: Bx.C / x87asm on
>> > [BITS 32]
>> > o16 jmp 08h:clear_pipe ; Jump to code segment, offset
>> > clear_pipe:
>> > mov ax, 10h ; Save data segment identifyer
>> > mov ds, ax

>> so instead of:
>> EA,xx,xx,08,00 16-bit... jmp 0008:clear_pipe
>> you have it create:
>> 66,EA,xx,xx,08,00

> No, it creates (due to BITS 32...):
> 66,EA,xx,xx,yy,yy,08,00
> Which is told by 0x66 to execute as:
> EA,xx,xx,08,00

> (BTW, it does work...)

looking at it again, yes it'll work..

but... this is just the sort of confusion that can be avoided by putting the
[bits 32] in the proper spot.. (and a side effect: you have three
unnecessary bytes in the generated code)

since the CPU is still in 16-bit mode until after the jump, the [bits 32]
should be placed between the jump and the clear_pipe label.... it is at this
point where the CPU is now in 32-bit mode since the segment descriptor gets
reloaded on the far jump...


From: Frank Kotler on
Herbert Kleebauer wrote:
> Frank Kotler wrote:
>
>
>>>>>>And the
>>>>>>monochrome screen is at B0000h, not B80000h, if you care...
>>>>>
>>>>>As far I remember, it's neither B0000h nor B80000. DOS programming
>>>>>must be really dead when such essential values aren't correctly
>>>>>remembered.
>>>>
>>>>Okay, refresh my memory...
>>>
>>>Both values contained an extra zero, but no big deal - it's like
>>>'mispelling' a word during an Instant Messaging session, they know what
>>>you mean.
>>
>>If I'da meant "B000:0000" I would've said so. Are you guys telling me
>>the tut is correct?
>
>
> Isn't it b8000 for text mode (and a0000 for graphics mode)?

For ega/cga/vga, yeah. For monochrome (ttl) cards, B0000h for text mode
- mode 7, not mode 3 - and... ??? for graphics (no graphics at all on my
old card). Newbie! :)

Best,
Frank

From: CodeMonk on
Frank Kotler wrote:
> Herbert Kleebauer wrote:
>> Frank Kotler wrote:
>>
>>
>>>>>>> And the
>>>>>>> monochrome screen is at B0000h, not B80000h, if you care...
>>>>>>
>>>>>> As far I remember, it's neither B0000h nor B80000. DOS programming
>>>>>> must be really dead when such essential values aren't correctly
>>>>>> remembered.
>>>>>
>>>>> Okay, refresh my memory...
>>>>
>>>> Both values contained an extra zero, but no big deal - it's like
>>>> 'mispelling' a word during an Instant Messaging session, they know what
>>>> you mean.
>>>
>>> If I'da meant "B000:0000" I would've said so. Are you guys telling me
>>> the tut is correct?
>>
>>
>> Isn't it b8000 for text mode (and a0000 for graphics mode)?
>
> For ega/cga/vga, yeah. For monochrome (ttl) cards, B0000h for text mode
> - mode 7, not mode 3 - and... ??? for graphics (no graphics at all on my
> old card). Newbie! :)
>
> Best,
> Frank
>

For the *old* Hercules cards, both text and graphics mode memory began
at B0000h. No graphics on your card? That is fossil-like old.

- Scott
From: Frank Kotler on
Herbert Kleebauer wrote:
> SpooK wrote:
>
>>On Aug 14, 12:01 pm, Herbert Kleebauer <k...(a)unibwm.de> wrote:
>>
>>>Frank Kotler wrote:
>>>
>>>>>>>>And the
>>>>>>>>monochrome screen is at B0000h, not B80000h, if you care...
>>>
>>>>>>>As far I remember, it's neither B0000h nor B80000. DOS programming
>>>>>>>must be really dead when such essential values aren't correctly
>>>>>>>remembered.
>>>
>>>>>>Okay, refresh my memory...
>>>
>>>>>Both values contained an extra zero, but no big deal - it's like
>>>>>'mispelling' a word during an Instant Messaging session, they know what
>>>>>you mean.
>>>
>>>>If I'da meant "B000:0000" I would've said so. Are you guys telling me
>>>>the tut is correct?
>>>
>>>Isn't it b8000 for text mode (and a0000 for graphics mode)?
>>
>>Correct... mostly. The base addresses are as follows...
>>
>>MONOCHROME = B000:0000 (0x000B0000)
>>COLOR = B800:0000 (0x000B8000)
>>GRAPHICS = A000:0000 (0x000A0000)
>
>
> Then sorry Frank. I'm old, but not old enough to have programmed a
> IBM PC with something older than VGA (at that time I used the
> superior Atari ST).

It isn't that I'm *that* old. It's that I subsist on hand-me-down
hardware. Always been a bit "behind the curve"...

Best,
Frank
From: Bx.C / x87asm on
>> > Another question: Is it really necessary to enable A20 line to enter
>> > PM?
>>
>> If you want to access "odd megabytes", yeah.
>
> Actually, why "odd megabytes"? Why A20 line decide if odd megabytes
> are available?

depends on whether you start with 0 or 1 when counting megabytes... but
basically.. every other megabyte is available, starting with the first

There have been whole chapters in books devoted to explaining this so it
should be easy to find info on it.. you might even want to WIKI for A20


tell us what exactly you know about A20, and real mode addressing, and we
might be able to give a better answer without typing a chapter's worth of
information

--
Bx.C


First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Prev: NASM HelloWorld - DOS
Next: ELF loading