***************** * Fragment DISPLAY - 6811 * * This fragment is be included in routines requiring * use of the 7-segment displays on the I/O box. * * Note that the calling program must specify the output port * in location PORT (two bytes). In most cases this will be * $1004 (PORTB). * * The calling program must also specify the hi_byte, mid_byte * and lo_byte in the lower nibble of locations HI_DIG, MID_DIG and * LO_DIG. * * The program is placed at PSCT + $200. It is the users responsibilty * to avoid overlapping code. * * The routine is called using JSR DISPLAY. * * All registers are saved on the stack and restored prior to * exiting. * * See Program CHECKSUM for typical use. * * Peter H. Anderson, MSU, 14 Jan 90; Checked 16 Jan 90 * modified 5 Feb 90; Checked 5 Feb 91; 15 Jan 93 ******************** ORG PSCT+$200 DISPLAY PSHX * save regs PSHA LDX PORT * get port address LDAA HI_DIG *load hi_dig and output ORAA #$F0 STAA 00,X ANDA #$7F * select latch STAA 00,X ORAA #$F0 * strobe STAA 00,X LDAA MID_DIG * mid digit ORAA #$F0 STAA 00,X ANDA #$BF * select latch STAA 00,X ORAA #$F0 * strobe STAA 00,X LDAA LO_DIG * lo digit ORAA #$F0 STAA 00,X ANDA #$DF * select latch STAA 00,X ORAA #$F0 * strobe STAA 00,X PULA * restore regs PULX RTS