
 Some DOS BIOs usefull memory addresses.

 0:0000h to 0:0200h is the INTerrupt Vectors, Dword = (OFFSET & SEGment word)
 0:0200h to 0:0400h is 512 byte BOOT stack area, not being used.
 0:0400h starts BIOs info data area. Set a SEG reg like GS=0 = access2 all.
Note, DOS uses a SEG REG set at 40h to access BIOs data. (40:0017h = 0:0417h)

;--------------------------- KBD only stuff--------------------------------
 0:0417h =b KBD flag byte (shift flags)
 0:0418h =b KBD flag byte		; See 0:0496h
 0:041Ah =w KBD BUF ptr, adr of first unused key in kBUF
 0:041Ch =w KBD BUF ptr, adr of last  unused Key in kBUF
 0:041Eh =w Start of KBD key_board_buffer = kBUF (16 words in a 32byte buffer)
 0:043Ch =w Last Word in KBD BUF (a word per key press, = a 16 key buffer)
 0:043Dh =b Last Byte of the KBD BUF (is not used?)	0:043E = BUFend

 0:0480h =w adr = start of current KBD buffer. Usually  DB 0x1E,00 unless moved
 0:0482h =w adr =  end  of current KBD buffer. Usually  DB 0x3E,00 = 0:043E

 0:0496h =b KBD flag byte, KBX
 0:0497h =b KBD flag byte, LED

;-------------------------end of KBD only stuff----------------------------

 0:0449h =b Current Video mode byte,  3=text 80x25, (0xB800 = 16,384 bytes)
 0:044Ah =w columns on screen = 80 in first byte. Vmode 3
 0:044Ch =w bytes per page, (Current Vmode, 3 = 4096 = 1000h)
 0:044Eh =w OFFset of current page in Vmem seg 0xB800:???? 4096=Page1 2000h=p2
 0:0450h =b Cursor Positions row/col page0-7 bytes.

 0:0460h =b End line for cursor   FFh=off 7=on, word 20FFh=off 0607h=on=0D0Eh
 0:0461h =b Start line for cursor 20h=off 6=on, use INT 10h AH=1 CX=on or off
 0:0462h =b Current Video Page

 0:046Ch =w Tick timer LOW  word, (Use CLI, get#, STI.) 18 per second.
 0:046Eh =w Tick timer HIGH word. 1573041 ticks per day,  65543 ticks per hour.

 0:0475h =b Number of HARD DRIVEs onboard.

 0:0480h =w adr = start of current KBD buffer. Usually  DB 0x1E,00 unless moved
 0:0482h =w adr =  end  of current KBD buffer. Usually  DB 0x3E,00 = 0:043E

 0:0484h =b ROWs-1 (Shows 24=18h in viewmem.com, 0-24=25) (INC # for ROW count)
 
 0:0496h =b KBD flag byte, KBX
 0:0497h =b KBD flag byte, LED

 0C08h
 0C0Bh =w Fast count down timer ?,  Word, Dword
 It is 7.6 times faster that TICK at 046Ch ?
 Use CLI =INTs off, get byte, & STI =INTs on

 B800h = video mode 3 memory SEG adr = 16,384 words = 32,768 bytes, pages 0-7.
 B900h = Page1 adr, 4096 in size = 2000 characters & 2000 attributes.
 Leaving 96 bytes unused between pages. (ok4 storage, variables, strings,etc)

Note, my info above & at EOF, may not be perfect ?
R. Brown info below.
 Ŀ--------- DOS BIOs SEG starts at 40h -----------------------
 40:17h byte   keyboard flag byte 0 (see int 9h)
 Ĵ bit 7  insert mode on     3  alt pressed
		     6  capslock on	    2  ctrl pressed
		     5  numlock on	    1  left shift pressed
 Ĵ     4  scrollock on	    0  right shift pressed
 40:18h  byte  keyboard flag byte 1 (see int 9h)    (IBM, old style)
 Ĵ bits 0=not pressed, 1=pressed
		 bit 7  insert pressed      3  ctrl-numlock (pause) toggled
		     6  capslock pressed    2  PCjr keyboard click active
		     5  numlock pressed     1  PCjr ctrl-alt-capslock held
		     4  scrollock pressed   0
		
		 keyboard flag byte 1 (see int 9h)  (IBM, Phoenix, new style)
		 bit 7  insert pressed     3  ctrl-numlock (pause) toggled
		     6  capslock pressed   2  SysReq pressed (enhanced kbd)
		     5  numlock pressed    1  Right  ALT pressed (enhanced kbd)
 Ĵ     4  scrollock pressed  0  Right CTRL pressed (enhanced kbd)


 40:96h  byte  keyboard flag byte 3 (see int 9h) KBX
		 bits 7  read ID in progress	  3  Right CTRL down. OOPs
		      6  last code was first ID  2  Right  ALT down. OOPs
		      5  forced NumLock 	  1  last code was E0h
		      4  101/102 kbd used	  0  last code was E1h
 40:97h  byte  keyboard flag byte 2 (see int 9h) LED
		 bits 7  keyboard error 	  3  reserved
		      6  LED update in progress  2  capslock LED status
		      5  kbd sent RESEND	  1  numlock LED status
		      4  kbd sent ACK		  0  scrollock LED status

-------------------------------------------------------------------------------

From 0:0200h to 0:00400h is the BOOT stack area that is now not being used.
From byte 512 to 1024 = 512 bytes that can be used by any program.
If SS=0 & SP = 03FC = DD 0 the stack will work4 8088 & up, & 
 MOV AL,[SS:0449h] ;Get Video Mode, works.

384 bytes is maximum stack needed by BIOs according to IBM. 1985?
So that leaves 128 bytes at 0:0200h for data, & most stack use is < 32 bytes,
unless you are using recursive code or unusual INTs ?

