Product specifications

RETI
;
VDPout: DI ;Disable all interrupts
;
(start of your routine)
(you MUST save all registers which will be affected by the servicing routine at this
point).
IN A,(VDPRGO) ;Has the VDP reached the end of
BIT 7,A ;the current active display
JR NZ,VDPou1 ;scan – Indicated by bit 7 of the VDP
;read only register = 1
;If condition is true then goto VDPou1
;and begin VDP servicing routine else
(Retrieve all saved registers)
RET1 ;exit interrupt routine and return to
;calling routine
;
VDPou1: (VDP servicing begins)
(Insert whichever section 3.3)
(routines you are using at this point)
IN A,(VDPRGO)
(end of your routine)
(Retrieve all saved registers)
RET1
Using VDP Interrupts
3.3
The most important point to note when using VDP interrupts is that whatever code you
write to go in them MUST NEVER take longer than 1/50
th
of a second (20,000
microseconds).
All of the following sections of code are designed to be placed in the VDP servicing
routine described in section 3.2 at the appropriate point.
As mentioned in section 3.1, the routine detailed in section 3.2 can be used to
generate reasonably accurate and useful clocks for time dependent processes or
delays within say games programs. Below is listed a section of code which will
generate a hundred hour clock and return the results in a 6 byte table called CLOCK.
The facilities it offers are:
1. The contents of CLOCK can be examined at any time to return a hundred
hour value for A) Hours - Bytes 0 and 1
B) Minutes - Bytes 2 and 3
C) Seconds - Bytes 4 and 5
An important point to note is that the values of the digits returned by this
routine are ASCII values.