aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/avr8/lib/forth2012/core-ext/avr-defers.frt
blob: 0421ab3fa5ef287282bc8a59c0536e0f192fd240 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
\ the following code works in the AVR only

\ use the eeprom to keep the XT. Unlike the RAM/USER
\ based locations, the EEPROM vector is available without
\ initialization.
: Edefer ( "name" -- )
    (defer)
    ehere dup ,
    ['] Edefer@ ,
    ['] Edefer! ,
    cell+ to ehere
;

\ the flash is writable, not that often, but it is
: Idefer ( "name" -- )
    (defer)
    ['] noop , \ a dummy action as place holder
    [: @i execute ;] , \ XT is directly in the dictionary.
    [: !i ;] ,
;