delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/18/16:02:24

Date: Sat, 18 Oct 1997 13:00:44 -0700 (PDT)
Message-Id: <199710182000.NAA16465@adit.ap.net>
Mime-Version: 1.0
To: Thomas Demmer <demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: NASM - passing string pointer from C++ to asm

At 03:45  10/16/1997 +0200, Thomas Demmer wrote:

>And, is NASM case sensitive? I never tried it, so I 
>don't know.
Yes it is.

Nate Eldredge
eldredge AT ap DOT net



b?
No. You have to poke the BIOS's byte directly. Here is an excerpt from the
Interrupt List:

MEM 0040h:0017h - KEYBOARD - STATUS FLAGS 1
Size:	BYTE

Bitfields for keyboard status flags 1:
Bit(s)	Description	(Table M009)
 7	INSert active
 6	Caps Lock active
 5	Num Lock active
 4	Scroll Lock active
 3	either Alt pressed
 2	either Ctrl pressed
 1	Left Shift pressed
 0	Right Shift pressed

So, for instance, to turn Numlock and its associated LED on:

        int b;
        b = _farpeekb(_dos_ds,0x00417);
        b |= (1 << 5) /* set 5th bit */
        _farpokeb(_dos_ds,0x00417,b);

Hope this helps.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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