-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-=- 	   GASM -=- Release Version 0.55 	  -=-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-= Contact: Gareth Owen | E-Mail: gaz@athene.co.uk =-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-=-=-=- GASM Homepage.... http://gasm.cjb.net -=-=-=-
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

See pmode.asm for an example of using the GASM support!
Its a boot sector, so you will need to write it to the
first sector of the disk!

Protected Mode is made easier by GASM in the following
ways..

-=- GDT support, follows the same format as John Fine's
    Macro..

The desc macro pieces together a segment descriptor.

desc  offset, selector, flags     ;For gate descriptors
desc  base, limit, flags	  ;For all other descriptors

base    is the full 32 bit base address of the segment
limit   is one less than the segment length in 1 or 4K byte units
flags   the sum of all the "D_" equates which apply 
offset  is the offset into the segment
selector is the segment selector

Here is a list of the D_ equates...
Each descriptor should have exactly one of next 8 codes to define the type of
descriptor
D_LDT		LDT segment
D_TASK		Task gate
D_TSS		TSS
D_CALL		386 call gate
D_INT		386 interrupt gate
D_TRAP		386 trap gate
D_DATA		Data segment
D_CODE		Code segment

Descriptors may include the following as appropriate:
D_DPL3		DPL3 or mask for DPL
D_DPL2		
D_DPL1		
D_PRESENT	Present
D_NOT_PRESENT	Not Present
		Note, the PRESENT bit is set by default
		Include NOT_PRESENT to turn it off
		Do not specify D_PRESENT

Segment descriptors (not gates) may include:
D_ACC		Accessed (Data or Code)

D_WRITE		Writable (Data segments only)
D_READ		Readable (Code segments only)
D_BUSY		Busy (TSS only)

D_EXDOWN	Expand down (Data segments only)
D_CONFORM	Conforming (Code segments only)

D_BIG		Default to 32 bit mode (USE32)
D_BIG_LIM	Limit is in 4K units

-=- TSS - This is almost the same as John Fine's Macro aswell..

To define a TSS do the following:

mytss	tss

Thats it, the TSS is 104bytes, and mytss will be a structure, ie.

mytss.back
mytss.io
mytss.eax

And so on...
You can also reference the structure as just mytss, which will point
to the beginning of the structure

-=-
Gareth Owen
gaz@athene.co.uk