                                  Forth-OS
                            8086/80386+ Assembler
                                  Overview

Major differences from standard assembler syntax:

1. Instructions end with a comma: INC, instead of INC
2. You can put multiple instructions on one line (no separator needed)
3. Reverse order: AX BX ADD, instead of ADD BX, AX

Examples:
	Standard			Forth-Assembler
	--------			---------------
	MOV EAX, 5			5 #, EAX MOV,
	INC DX				DX INC,
	PUSH [EBP+8]			8 EBP@ PUSH
	PUSH [EBX] ESI*4		0 EBX@ ESI+ 4x PUSH,

Memory operands:
	Displacement only: <disp> #@
	Base register:     <disp> EAX@
	Index register:    4x EAX+
		(also requires base/disp; ie, ErX@ or #@)

Origin address:
	<address> ORG

Operand size:
	USE16
	USE32

Data:
	<number> DB,	byte  (ie, 5 db,  or  'A db,)
	<number> DW,	word
	<number> DD,	dword
	<number> DC,	cell (word in 16-bit mode; dword in 32-bit mode)
	Strings: DB" string" - TO BE DONE
	Shorthand character entry: db A - TO BE DONE

Prefix instructions - same as a normal assembler:
	CS: SS: DS: ES: FS: GS:
	LOCK:
	ADRSIZ:
	OPSIZ:
	REP REPE REPZ
	REPNE REPNZ

String instructions:
	STOS,		byte
	W-PTR STOS,	word
	D-PTR STOS,	dword
	(same idea for LODS, MOVS, CMPS, SCAS)

I/O instructions:
	Port in DX:	AL IN,   AX IN,   EAX IN,   AL OUT,  etc...
	Port as imm:	$E1 # AL IN,   $E0 # AX OUT,

Forward references are difficult (You shouldn't need them in a FORTH system,
where new code builds on previous code. Use the structured conditionals
instead of JZ, JBE, etc.)  I had to do a few forward jumps at boot time, so
I created a few routines.  Use it like this:
	JMP-FROM label   (creates the actual JMP instruction)
	...
	label JMP-TO     (patches the JMP so it lands here)

