File: gettoken.t2

For general comments see here
LineAddressObject Code LabelF1N1BF2N2CommentsCheck
1 0  ; tape1.d/gettoken.t2
2 0  ;--------------------
3 0  ;
4 0  ;---------------------------------------------------------------
5 0  ;
6 0  gettoken::; 
7 0  ;
8 0  ; get token, lookup in dict if identifier
9 0  ;
10 0  =658 
11 658  .ent:; 
12 658 0540600 cls token   ; @658
13 658+0000000 o00 0   ;=1
14 659   call     ; get basic token
14+1659 7303331000667 lnk packword.lnk:jmp packword.ent 
15 660 4005131001226 jmp .id:jmp .id;ident
16 661 4005161101234 jmp .m2:jmp .m1;real number : integer number
17 662  ;
18 662  .id:call     ;lookup keyword/symbol @662
18+1662 7303521000726 lnk lookupkw.lnk:jmp lookupkw.ent 
19 663 0000000000576 +ident; param - address of word
20 664 1021233 jn .ret   ; negative
21 664+1041233 jz .ret   ; zero - not found
22 665 2000022600001 sto 4/lod 1; get kw value
23 666 0400600.store:sto token   ; save kw value
24 666+0000000 o00 0    
25 667  .ret:ret      
25+1667 0005107000001 o00 gettoken.lnk/jmp 1 
26 668  ;
27 668 0440600.m2:inc token   ; return token = -2, integer
28 668+0440600.m1:inc token   ; return token = -1, real
29 669 0220600 o11 token   ; negate number
30 669+1001232 jmp .store   ; set token = -2
31 670  ;-------------------------------------------------------------------