 if DO_HISTORY
 sttl History Entry Procedures
 pag

*
* H_cpu - Place a transaction from the CPU into
*         the history Queue.
*
H_cpu pshs d,x
 ldx hstptr get history queue pointer
 lda cpu_iop
 sta hst_cmd,x
 lda cpu_iop1
 sta hst_seq,x
 lda cpu_iop3
 sta hst_tty,x
 lda cpu_iop2
 sta hst_val,x
 leax HRECSIZ,x
 cmpx #hstptr end of Queue?
 blo 10f
 ldx #hstbuf
10 stx hstptr
 puls d,x,pc

*
* H_iop - Place a transaction from the IOP into
*         the history Queue.
*
H_iop pshs d,x
 ldx hstptr get history queue pointer
 lda iop_cpu
 sta hst_cmd,x
 lda iop_cpu1
 sta hst_seq,x
 lda iop_cpu3
 sta hst_tty,x
 lda iop_cpu2
 sta hst_val,x
 leax HRECSIZ,x
 cmpx #hstptr end of Queue?
 blo 10f
 ldx #hstbuf
10 stx hstptr
 puls d,x,pc
 endif
