Prev: 0605 Up: Map Next: 0802
07CB: THE 'VERIFY' CONTROL ROUTINE
Used by the routine at SAVE_ETC.
The verification process involves the loading of a block of data, a byte at a time, but the bytes are not stored - only checked. This routine is also used to load blocks of data that have been described with 'SCREEN$' or 'CODE'.
Input
HL Block start address
Output
VR_CONTRL 07CB PUSH HL Save the 'pointer'.
07CC LD L,(IX-$06) Fetch the 'number of bytes' as described in the 'old' header.
07CF LD H,(IX-$05)
07D2 LD E,(IX+$0B) Fetch also the number from the 'new' header.
07D5 LD D,(IX+$0C)
07D8 LD A,H Jump forward if the 'length' is unspecified, e.g. 'LOAD name CODE' only.
07D9 OR L
07DA JR Z,VR_CONT_1
07DC SBC HL,DE Give report R if attempting to load a larger block than has been requested.
07DE JR C,REPORT_R
07E0 JR Z,VR_CONT_1 Accept equal 'lengths'.
07E2 LD A,(IX+$00) Also give report R if trying to verify blocks that are of unequal size. ('Old length' greater than 'new length'.)
07E5 CP $03
07E7 JR NZ,REPORT_R
The routine continues by considering the 'destination pointer'.
VR_CONT_1 07E9 POP HL Fetch the 'pointer', i.e. the 'start'.
07EA LD A,H This 'pointer' will be used unless it is zero, in which case the 'start' found in the 'new' header will be used instead.
07EB OR L
07EC JR NZ,VR_CONT_2
07EE LD L,(IX+$0D)
07F1 LD H,(IX+$0E)
The verify/load flag is now considered and the actual load made.
VR_CONT_2 07F4 PUSH HL Move the 'pointer' to the IX register pair.
07F5 POP IX
07F7 LD A,($5C74) Jump forward unless using the VERIFY command (T-ADDR-lo=+02), with the carry flag signalling 'LOAD'.
07FA CP $02
07FC SCF
07FD JR NZ,VR_CONT_3
07FF AND A Signal 'VERIFY'.
VR_CONT_3 0800 LD A,$FF Signal 'accept data block only' before loading the block.
This routine continues into LD_BLOCK.
Prev: 0605 Up: Map Next: 0802