aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/avr8/words/i.asm
blob: 4943073c5859a5faba6e4f66c9af183e40fb22ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
; ( -- n ) (R: loop-sys -- loop-sys)
; Compiler
; current loop counter
VE_I:
    .dw $FF01
    .db "i",0
    .dw VE_HEAD
    .set VE_HEAD = VE_I
XT_I:
    .dw PFA_I
PFA_I:
    savetos
    pop tosl
    pop tosh  ; index
    pop zl
    pop zh    ; limit
    push zh
    push zl
    push tosh
    push tosl
    add tosl, zl
    adc tosh, zh
    jmp_ DO_NEXT