DMAPT
Format: var = DMAPT (expr)
Supported by: Telmac SBASIC v 24.3
Similar commands: RCA BASIC3 V1.1: DMAPT
This command is similar to the DMAPT command in RCA BASIC3 V1.1, however for some reason the command in SBASIC does not change the DMA Pointer but changes the interrupt register.
Load interrupt register with value specified by expr, i.e. CPU 1802 register R1 (= start of interrupt routine) will be loaded with the specified value. The function also returns the former interrupt routine address.
Example
10 A = DMAPT (@D445) 20 PR A 30 GOTO 20
Will result in:
5792
5792 will be printed repeatedly, until the program is stopped by the BREAK key.
Hexadecimal value of D445 will be loaded into register R1 as long as the program runs. After 'BREAK' the value @16A0 (= 5792 decimal) is restored as this value is the start address of the SBASIC interrupt routine handling, see also the ENINT command.
Note the above example is NOT complete, to have any use of this the user should also program an actual machine code interrupt routine at address @D445 and connect some external hardware to the CDP 1802 interrupt.