delorie.com/archives/browse.cgi | search |
Message-ID: | <3f34b6fb$0$164$cc7c7865@news.luth.se> |
From: | Martin Str|mberg <ams AT speedy DOT ludd DOT luth DOT se> |
Subject: | Re: get the last key pressed |
Newsgroups: | comp.os.msdos.djgpp |
References: | <20030809025939 DOT 05142 DOT 00000265 AT mb-m01 DOT aol DOT com> |
User-Agent: | tin/1.4.6-20020816 ("Aerials") (UNIX) (NetBSD/1.6Q (alpha)) |
Date: | 09 Aug 2003 08:55:23 GMT |
Lines: | 25 |
NNTP-Posting-Host: | speedy.ludd.luth.se |
X-Trace: | 1060419323 news.luth.se 164 130.240.16.13 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Sterten <sterten AT aol DOT com> wrote: : #include <stdio.h> : int getkey() { : int key=55; : __asm__ __volatile__ (" : pushl %%eax : movl $256,%%eax : int $22 This int makes your program totally broken. : andl $255,%%eax : movl %%eax,%0 : movl $3072,%%eax : int $33 This one too. I'm very surprised it didn't crash. You can't do int like that when in protected mode. Read the FAQ and the documentation for __dpmi_int(). Right, MartinS
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |