Spectrum ROM | Routines |
Prev: 13339 | Up: Map |
The address of this routine is found in the table of addresses. It is called via a calculator literal (C0-C5) by the routines at BEEP, FOR, NEXT, CIRCLE, DRAW, CD_PRMS1, DEC_TO_FP, e_to_fp, PRINT_FP, series, n_mod_m, int, exp and get_argt.
This subroutine is called using the literals C0 to C5 and the parameter derived from these literals is held in the A register. This subroutine is very similar to get_mem but the source and destination pointers are exchanged.
|
|||||||
st_mem | 13357 | PUSH HL | Save the result pointer. | ||||
13358 | EX DE,HL | Source to DE briefly. | |||||
13359 | LD HL,(23656) | Fetch the pointer to the current memory area (MEM). | |||||
13362 | CALL LOC_MEM | The base address is found. | |||||
13365 | EX DE,HL | Exchange source and destination pointers. | |||||
13366 | CALL duplicate | The five bytes are moved. | |||||
13369 | EX DE,HL | 'Last value'+5, i.e. STKEND, to DE. | |||||
13370 | POP HL | Result pointer to HL. | |||||
13371 | RET | Finished. | |||||
Note that the pointers HL and DE remain as they were, pointing to STKEND-5 and STKEND respectively, so that the 'last value' remains on the calculator stack. If required it can be removed by using delete.
|
Prev: 13339 | Up: Map |