exec_goto proc pascal near
          uses ax,dx,di
           
          call get_token
          cmp tok,_EOL          ;is label absent ?
          jne @@check_label
          call putback
          push GOTO_WO_LAB
          call serror
@@check_label:       
          push offset token
          call look_up          ;check for label 
          or al,al              ;must not be reserved word
          jz @@get_label
          push RESERVED_WORD
          call serror
@@get_label:
          push offset token
          call find_label
          or ax,ax              ;is label found ?
          jnz @@fix_stk
          push UNDEF_LAB
          call serror
@@fix_stk:
          cmp ftos,0
          je @@set_ip           ;don't need to fix empty stack
          push ax
          mov di,size for_struct
          mov ax,ftos
          dec ax
          mul di
          mov di,offset fstack
          add di,ax
          pop ax
@@check_next:
          cmp di,offset fstack
          jb @@set_ip           ;we did reach for stack bottom
          cmp ax,[di].loc
          jbe @@fix_ftos        ;GOTO above FOR
          cmp ax,[di].next
          jae @@fix_ftos        ;GOTO below NEXT
          jmp @@set_ip          
@@fix_ftos:          
          dec ftos              ;clear stack
          sub di,size for_struct;move from top to bottom
          jmp @@check_next          
@@set_ip:          
          mov _ip,ax            ;start from new point
          ret
exec_goto endp
 
find_label proc pascal near
           arg @@str:WORD
           uses di
           
           mov di,offset label_table
@@check_next:
           push di
           push @@str
           call strcmp
           or ax,ax
           jz @@calc_next
           mov ax,[di].p    ;address of point to go
           jmp @@exit
@@calc_next:
           add di,size label_struct
           cmp di,(offset label_table)+NUM_LAB*size label_struct
           jb @@check_next  
           xor ax,ax        ;label not found
@@exit:
           ret
find_label endp