New stuff for putting out on faq
	(but some are not faq's, but special)
	

Q:
From: Saad <sma202@is5.nyu.edu>
To: Chee Yap <yap@jinai.cs.nyu.edu>
Subject: keyboard int

Hi Professor, I am trying to control the special keys numlock, capslock,
scroll lock and the insert key in my editor.  I know you can use Int 16h
function 2h to get the state of keyboard flags but how do you modify the
flags?  I've look everywhere but I can't find the interrupt or anything on
the topic.  I know this should be easy because I've seen tons of small
.com programs turning numlock off.

A:
Disregard my email about controlling the numlock, capslock, etc. keys.  I
figured it out.  The BIOS stores the flags at 0040:0017.

Saad

Q: Would the following work: 

	mov [Input +1],al 

  where Input is a variable? 

A: This is NOT an error.  The text in section 10.2.2 does
not mention this possibility.  But, if you
use any registers at all, then these must be
a based or index register
(BX, SI, etc) for indirect addressing.
Note that indirect addressing is always indicated
by [...].

Q: TASM COMMAND LINE OPTIONS:
	
	(a) In the command line for tasm,
	you can insert a file containing
	part of the command line, provided
	you append "@" to the file name:

		:> tasm @myoptions.ta hw1.asm

	where myoptions.ta contain some assembler options
	(such as /zi). You can string together several of these
	@-files if you wish.

	(b) /z is useful to ask tasm to
	list the offending lines with
	your errors.

Q: How to set working directory for TASM:

Dear Professor Yap,
	I recieved your e-mail.  I have found out some little
technicalities about TASM and TLINK in the ACF labs.  The default settings
that the ACF lab has for TASM and TLINK does not allow you to make an obj
or exe file without following these directions...

1- go to applications folder--programming--dos programming
2- you should now see icons for TASM TLINK TD etc.
3- highligh the TASM icon
4- right click on TASM so you get a pop up menu
5- click "properties"
6- select "program" from the tabs on this menu
7- were it says working file the default is "Z:\BIN\TASM4\BIN"
8- change the default so it reads "a:\"
9- you can now create an obj file by double clicking on the icon TASM
10- **the obj file will be written to the a: drive so make sure you have a
floppy disk


Q: BAT files

A:	@rem remark!
	echo this is my bat file
	tasm /zi hw1
	tlink /v hw1
	td hw1

Q: I get in and out of the editor alot, and in between
	I assemble and run my programs.  How can I simplify this
	process in Win95?
 
A: You might want to make a shortcut
        for your favorite editor on the desktop.  Then you
        can set the default working directory and 
        bat files for this shortcut under properties.
        You can even make several shortcuts for the
        same editor, but with different properties! 
        Ditto for creating shortcuts for MSDOS prompts with 
        different properties!  Now you can invoke them
	all from the windows, and simultaneously.

Q: Can I mix text and video modes on the same screen?

A: No.  But your question suggests that
	you want to do both text and graphics on the same
	screen.  Remember that you can do some primitive
	graphics in text mode, and similarly, you get some
	simple support for text outputs in graphics mode.
	For instance, there is an extensive character
	set in text mode for drawing rectangles and
	simple shapes.


Q: The book (chap 20) mentions the additional segment registers fs and gs.
	Can we use them in addition to ds and es?

A: Yes, you just have to put the .386 directive first,
	and then you can use them as segment overrides.
	E.g.

	.model small
	.386
	.data
	x db 'N'
	y db 'Y'
	.code
	start:
	mov ax,@data
	mov ds,ax
	mov fs,ax
	mov gs,ax
	;
	mov ah,2		; output char function
	mov dl,byte ptr fs:x	; print 'N'
	int 21h
	;
	mov dl,byte ptr gs:y	; print 'Y'
	int 21h
	;
	mov ax,4c00h
	int 21h
	end start

