News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

NOOB question

Started by MASM, January 02, 2012, 03:05:57 PM

Previous topic - Next topic

sinsi

If you mean by "flat" that your ES selector has base=0 and limit=4G then the video memory in mode 3 starts at linear address 000B8000h.

  mov byte ptr es:[0b8000h],'A'
;or
  mov edi,0b8000h
  mov byte ptr es:[edi],'A'

Not sure how masm handles the size overrides if you use this code in a 16-bit segment.
Light travels faster than sound, that's why some people seem bright until you hear them.

MASM

Thank you sinsi that's what I have been looking for

MOV BYTE PTR ES:[0B8000H], 'A'

yes, it does make make sense to install a descriptor pointing to 0B8000H

first, though, I needed to know how to address memory in protected mode

MASM

@redskull & MichealW

I am adapting a piece of code from the 80386 System Software Writer's Guide.

my Data Descriptor is as follows

DATA DW 0FFFFH       ; segment limit
         DB  0,0,0          ; segment base 0-23
         DB  10010011B ; access right byte
         DB  10001111B ; G D/B 0 AVL limit 16-19
         DB  0               ; segment base 24-31