Randall Hyde | 8 May 04:12 2005

HLA v2.0/ADK Update

Hi All,

I've posted an update to the Assembler Developer's Kit
(the basis for the HLA v2.0 assembler) on Webster at
(ignore the dates, I've still got to update the HTML page
and the master file is on a laptop I don't have available
to me right now).

This version has a couple of major additions.

1. (The Biggie) The ADK now assembles and runs under Linux.

2. The regression test suite has also been ported to Linux
(no small feat, this port uncovered a bunch of bugs in
both the test suite and the assembler).

3. I've modified the test suite to generate the comparison
test data for the test from a known (good) version of the
assembler. This saves a bit of time when downloading the
files as you don't need copies of all the test data in the
ZIP file.

4. This version includes the "static variable placement
optimization" that I've discussed in other threads around
here. It does a half-way decent job of filling in gaps
between the variables at either end of a declaration

Sooner or later I'll get around to posting a Linux-ized
(Continue reading)

glburt | 15 May 18:20 2005

Getting ALT and CTRL keystrokes

In Linux Assembly, X86/NASM, how can I find out if a ALT-a or CTRL-a has been pressed?

Gary Burt
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Frank Kotler | 15 May 20:06 2005

Re: Getting ALT and CTRL keystrokes

glburt <at> comcast.net wrote:
> In Linux Assembly, X86/NASM, how can I find out if a ALT-a or CTRL-a has been pressed?

Well, here's a half-baked attempt to explore that question.
CTRL-A is 1, as expected... CTRL-C or CTRL-Z quit... as does
SysReq (???). CTRL_Q, and a few other combinations don't
return anything(???). ALT- combinations... and function
keys, editing keys, etc. return multiple bytes, starting
with 1Bh (ESC).

Maybe you can have some fun playing with it anyway...


; shows hex bytes returned from "getc"
; nasm -f elf myprog.asm
; ld -s -o myprog myprog.o

global _start

; misc. equates
%define NL 10
%define STDIN 0
%define STDOUT 1

; sys_calls
%define SYS_EXIT 1
(Continue reading)