delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/12/00:02:23

From: sochaxx AT flash DOT net (art socha)
Newsgroups: comp.os.msdos.djgpp
Subject: DJGPP/NASM HELP!!
Date: Wed, 11 Mar 1998 22:51:12 -0800
Organization: Flashnet Communications, http://www.flash.net
Lines: 24
Message-ID: <MPG.f7125beb06f9eb7989688@news.flash.net>
NNTP-Posting-Host: iasc7-87.flash.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ok, I finally got NASM to avoid using DJGPP's crappy looking unix-style 
assembler. It works great.

Next step, write video routines with NASM and link with DJGPP. Great, 
easily done. Got the initialization and exit procs done. 

Now to write to video memory. Obviously I'm using 32-bit pmode and need 
to access video memory. Now then, using TASM with DOS32(a 32 bit extender 
for asm programmers), i simply access video memory via

mov eax,0a0000h
mov [eax],15       ;plot a pixel in the upper left hand corner...

0a0000h as opposed to 16-bit segmentation 0a000h

this works fine with the flat mode in TASM linked with DOS32!

however using NASM i keep getting a general protection error when it 
reaches the mov eax,0a0000h statement. doesn't make much sense to me 
unless NASM or DJGPP is protecting video memory from being written (and 
why this would be i don't know).

anyway, if you can shed some light on this mystery it would help 
tremendously.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019