Mail Archives: djgpp/1996/03/21/07:05:51
Xref: | news2.mv.net comp.os.msdos.djgpp:2012
|
From: | Chris Dial <cdial AT jeffnet DOT org>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Is this ASM ok?
|
Date: | Wed, 20 Mar 1996 18:02:26 -0800
|
Organization: | Oregon Public Networking
|
Lines: | 39
|
Message-ID: | <3150B8B2.8B2@jeffnet.org>
|
NNTP-Posting-Host: | 204.214.98.28
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hi, I am pretty new to DJGPP and I have 2 questions about the below ASM
code. #1: The below code compiles fine under DJGPP 2.0 when I use -O2 on
the commandline, but if I use -O3 then GAS tells me that stosb is an
unrecognized instruction. #2: I heard that you are supposed to tell
DJGPP which registers you are messing with, how do I do this?
asm(
"cld
movl _tscreen,%edi /* Put tscreen into edi */
movl _tcol1,%edx /* Put tcol into edx */
movl _tcolstep,%ebx /* Put tcolstep into ebx */
movl _tlength,%ecx /* Put length into ecx */
loopf:
movb %dh,%al /* Put color into eax */
addl %ebx,%edx /* Add colstep to col */
stosb
decl %ecx
jnz loopf" /* If ecx not zero goto loop */
);
Thanks for any help you experienced pmode/DJGPP coders can give me!
-Chris Dial
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2
mQCNAy/nc7sAAAEEANXBozSrzhhNtLZsfgVtn4v5EHv0qsM/D6Va6FODXb6epjn8
vVPgdtMcjG98PmGmD87lWp9G2BlQuKeiyER7+NmBjN749R3+bjFFYdvAaoyKuw/w
BgJaaq0blp21jwxuEIhPtUfNn9E1M1KuaX1HTvLV+1bJUDvZ/f+gE2yZnRhZAAUR
tCVDaHJpcyBHLiBEaWFsIDxjZGlhbEBqZWZmbmV0LmVmbi5vcmc+
=NWMa
-----END PGP PUBLIC KEY BLOCK-----
- Raw text -