	some notes about the unfinished hcompo14 entry.. by TAD
	=======================================================

here is some *incomplete* source code for a spew assembler.
I've decided to release it to help others squeeze a few
more bytes off their entries and because I probably won't
have enough time to finish an entry before the deadline.

1) the instruction mnemonic strings are reduced 2 bytes (word)
   which may/maynot break the compo rules. of course certain
   strings require a 2nd check (JP, JPcc and ADCA, ADDW)

2) FCB functions were used to read the file

3) an 'AAD 0' instruction is used to make AH and check AL<>0

4) as TABs are illegal in .SAM source, I've used <20h to denote
   the EOF and EOL characters (this means all control-codes
   are treated as EOL codes).

5) AH=00 or AH=FF in the 'mainlp' scanner, this is used to
   ignore comments. A ';' makes AH=FF, so OR AL,AH will help
   filter out comments in the same 'mainlp' loop, of course
   AH is reset to 00 at EOL/EOF.

6) db strings are scanned using the leading ' to search for
   the closing character.

7) @labels and %register names are skipped to the terminating
   ' ' space char - this should make searching the symbol-table
   and looking for instruction strings easier (remember I only
   compare the 1 or 2 words, so 'OSCALL' = 'OS' the 'CALL' part
   is skipped :)

8) a SUB AL,03Bh is used to deal with ;comments - it makes AX=0000
   followed by a DEC AX to make AH=FF  :)

9) hex number are scanned using the following code snippet with
   some nice BCD instructions...

	hex3:
		lodsb
		sub	al, '0'
		aam	17		; pack '0123456789ABCDEF'
		aad	10  		; into 0..F hex
		shl	dx, 4
		or	dl, al
		loop	hex4

10) operands are 'fixed-up' in the same mainlp, my plan
    was to flag the type of fix-up after finding the correct
    mnemonic (e.g. JPNZ = fixup relative 8)

11) the high-byte nibble is OR'd into place  mem(PC-2) and
    the low-byte is simply MOV'd into place mem(PC-1).

	thats all folks.. have fun

regards
	TAD


  

