00000            MAIN       START   0    
                  . nastavi X register za prehod cez tabelo
00000  072048               LDX     counter    
                  . izracun vrednosti za vsak x v tabeli in
00003  0F2048    LOOP       STA     ctx_a    
00006  4B2015               JSUB    HORNER_X    
00009  03203F               LDA     counter    
0000C  190003               ADD     #3    
0000F  0F2039               STA     counter    
00012  072036               LDX     counter    
00015  290009               COMP    #bytes_len    
00018  3B2FE8               JLT     LOOP    
                  
0001B  3F2FFD    HALT       J       HALT    
0001E                       END     MAIN    
                  
0001E  010001    HORNER_X   LDA     #1    
                  
00021  23A01E               MUL     in,X    
00024  190002               ADD     #2    
                  
00027  23A018               MUL     in,X    
0002A  190003               ADD     #3    
                  
0002D  23A012               MUL     in,X    
00030  190004               ADD     #4    
                  
00033  23A00C               MUL     in,X    
00036  190005               ADD     #5    
                  
00039  0FA006               STA     in,X    
                  
                  . povrni kontekst pred skokom v subrutino
0003C  03200F               LDA     ctx_a    
                  
0003F  4F0000               RSUB        
                  
                  . tabela x-ov polinoma
00042  000000    in         WORD    0    
00045  000002               WORD    2    
00048  000003               WORD    3    
                  . parametri
0004B            lastin     EQU     *    
0004B            bytes_len  EQU     lastin-in    
0004B  000000    counter    WORD    0    
                  . kontest
0004E  000000    ctx_a      RESW    1    
