Friday, October 14, 2005

Deadlock


Howzzzaaat?

Tuesday, June 14, 2005

Sun: Expert C Programming

Expert C Programming
Deep C Secrets by Peter van der LindenISBN 0-13-177429-8
http://www.sun.com/971124/cover-linden/cchap.html

Monday, June 13, 2005

Dynamic C - For embedded systems

Thursday, June 09, 2005

Dos Memory Map

PC-DOS and MS-DOS memory map

PC-DOS and MS-DOS memory map

high memory
segmentoffsetsizecontents
0000h0000h1024interrupt vector table
0400h172BIOS communication area
04ACh68reserved by IBM
04F0h16user communication area
0500h256DOS communication area
0600hvariesoperating system:
IBMBIO.COM (DOS interface to the BIOS)
IBMDOS.COM (DOS interrupt handlers and interrupt 21h service routines
DOS buffers, control areas, and device drivers
COMMAND.COM (resident portion), interrupt 22h, 23h, and 24h handlers, routine to reload transient portion of COMMAND.COM
memory-resident utilities
transient applications
transient portion of COMMAND.COM
9000hFFFFh highest address of user memory
A000h0000h128Kreserved area of ROM
A000h0000h beginning of area used by EGA and PS/2 video systems
B000h0000h4000monochrome video memory
0800h16Kcolor graphics adaptor (CGA) video memory
C000h0000h192KROM expansion and control area
8000h ROM for hard disk
D000h ROM expansion and control area
E000h ROM expansion and control area
F000h0000h16Kreserved ROM
4000h40Kbase system ROM, ROM BASIC
E000h8KROM BIOS
low memory

If a TSR is created in assembly langauge, the programmer has exact control over the use of memory and can omit the heap area and place the initialization code at the end of the segment (where it can be released after initialization).

If a TSR is created in C, the small-memory model must be used. Because of the severe memory limitations, the programmer should not use C allocation functions (such as malloc and calloc), as these add to the heap. A small heap must be assigned because some C library routines (such as fprintf) allocate memory from the heap.

Variables required by MS-DOS interrupt handlers must be placed at the beginning of the code segment.