http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Assembly in Win32



Windows is real picky about which memory addresses you access, be careful
when addressing, since it won't allow you access to alot of registers(for
instance, try writing a putpixel proc with a 32bit c++ compiler , and window
throws a protection fault)
-----Original Message-----
From: Neil <dreaded.neil@phreaker.net>
To: gameprogrammer@gameprogrammer.com <gameprogrammer@gameprogrammer.com>
Date: Friday, October 13, 2000 2:35 AM
Subject: Assembly in Win32


>Well, I figured out how to get the data for the BIOS font, by:
>mov BH, 3 ;flag to return 8x8 font pointer
>mov AX, 0x1130 ;function 11h, subfunction 30h
>int 0x10 ;interrupt 10h
> . . then the font bitmap starts at [ES:BP] (and BP must be resored). When
>I try the code in "debug," it appears to work fine. This is great, except .
> .
>
>I'm using NASM to output a Win32 .obj file, and linking it with the rest of
>my program. Whenever I call this as function, though, I get a GPF. Somehow
>I get the feeling that Windows doesn't like me trying to do this sort of
>thing (I also feel a little stupid because I can't figure out how to get my
>attempts at assembly to work). Is it possible to do this in my Win32
>program (i.e. does Win32 even allow the use of int, and if so, are there
>certain restrictions, and what about memory addressing differences)? If
>not, is there an alternative that would accomplish the same thing?. :]
>
>-[ Neil-Edelman -- dreaded.neil@phreaker.net -- ICQ UIN: 705130
>-[ http://neil.freeshell.org/ -- http://moop.bizland.com/
>-[ "Nature makes frequent use of [the infinite] everywhere." -Georg Cantor
>
>=================================================================
>The GameProgrammer.Com mailing list is for the open discussion
>of any topic related to the art, science, and business of
>programming games. This list is especially tolerant of beginners.
>We were all beginners once
>
>To SUBSCRIBE or UNSUBSCRIBE please visit:
>http://gameprogrammer.com/mailinglist.html
>
>

=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html