
Files:

  B1 - Defines conditional label for BASIC in original PET
  B2 - Defines conditional label for BASIC in V2 PET
  B2b - Defines conditional labels for BASIC in V2 PET with business keyboard
  B4 - Defines conditional label for BASIC in V4 PET
  BASIC.asm - Source INCLUDEd by "PBAS.asm", "QBAS.asm" or "RBAS.asm"
  PBAS.asm - Source for BASIC in original PET
  PMMAP.asm - Memory map for original PET
  QBAS.asm - Source for BASIC in V2 PET
  QMMAP.asm - Memory map for V2 PET
  RBAS.asm - Source for BASIC in V4 PET
  RMMAP.asm - Memory map for V4 PET
  source.doc - This file
  ver - Copy of either "B1", "B2", "B2b" or "B4"  (File not included)


Non-standard mnemonics:

  'BNC' or 'BL' equivalent to 'BCC'  (Branch Not Carry, Branch Low)
  'BC' or 'BGE' equivalent to 'BCS'  (Branch Carry, Branch Greater or Equal)
  'BNV' equivalent to 'BVC'  (Branch Not oVerflow)
  'BV' equivalent to 'BVS'  (Branch oVerflow)
  'BNM' equivalent to 'BPL'  (Branch Not Minus)
  'BM' equivalent to 'BMI'  (Branch Minus)
  'BE' or 'BZ' equivalent to 'BEQ'  (Branch Equal, Branch Zero)
  'BNZ' equivalent to 'BNE'  (Branch Not Zero)
  'CLB' equivalent to 'SEC'  (CLear Borrow)
  'SBB' equivalent to 'SBC'  (SuBtract with Borrow)
  'BB' equivalent to 'BCC'  (Branch Borrow)
  'BNB' equivalent to 'BCS'  (Branch Not Borrow)


Mnemonics for conditional assembly:

  'ifdef LABEL' assembles source to next ' endif' if 'LABEL' defined
  'ifndef LABEL' assembles source to next ' endif' if 'LABEL' not defined
  'endif' terminates current 'ifdef' or 'ifndef'


Other pseudo-mnemonics:

  'ASC' - used to define ASCII string constants
  'DB' - used to define other constants
  'DS' - used to allocate space
  'DSECT' - used to define memory without allocating space  (Dummy SECTion)
  'DEND' - used to terminate dummy section
  'EQU' - Used to equate a label to a value
  'INCLUDE' - Used to include another source file


Coding tricks used to save space:

  1) Using ' JMP subr' instead of ' JSR subr' and ' RTS'
  2) Using a section of code as both a subroutine and in-line code
  3) Using the ' BIT' instruction to avoid jumps


Conventions used to clarify coding tricks:

1)

*************************** begin code snippet ****************************

;
;	Comment added to make source more readable
;
*	JSR	subr
;
;	Comment added to make source more readable
;
*	RTS
;
;	Existing logic
;
	JMP	subr

**************************** end code snippet *****************************

2)

*************************** begin code snippet ****************************

;
;	Comment added to make source more readable
;
*	JSR	subr
;
;	Comment added to make source more readable
;
*	RTS
;
;	Existing subroutine logic
;
subr	TAX

**************************** end code snippet *****************************

3a)

*************************** begin code snippet ****************************

;
;	First subroutine entry point
;
ENTRY1	SEC
;
;	' BIT zeropage' instruction that, in effect, branches around 'ENTRY2' 
;
	DB	$24
;
;	Alternate subroutine entry point
;
ENTRY2	CLC
;
;	Start of subroutine
;
subr

**************************** end code snippet *****************************

3b)

*************************** begin code snippet ****************************

;
;	First subroutine entry point
;
ENTRY1	LDA	#0
;
;	' BIT absolute' instruction that, in effect, branches around 'ENTRY2' 
;
	DB	$2C
;
;	Alternate subroutine entry point
;
ENTRY2	LDA	#-1
;
;	Start of subroutine
;
subr

**************************** end code snippet *****************************
