_fpseek: 
        MOV.L       R2,R5           ; Set the value of R2 (offset) in R5. 
        MOV.L       #PARM,R2        ; Set the address of the parameter block in R2. 
        MOV.L       R5,4h:5[R2]     ; Set the value of R5 in R1 + 4 bytes (offset). 
        MOV.B       R1,1h:5[R2]  ; Set the value of R1 (file number) in R1 + 1 bytes  
                                    ; (offset). 
        MOV.B       R3,2h:5[R2]     ; Set the value of R3 (direction) in R2 + 2 bytes  
                                    ; (direction). 
        MOV.L       #010C0000h,R1   ; Set the function code of FSEEK in R1. 
        MOV.L       #SIM_IO,R5      ; Set the address of the system call in R5. 
        JSR         R5              ; System call 
        NOP 
        MOV.L       #PARM,R1  ; Set the address of the parameter block in R1. 
        MOV.B       [R1],R1   ; Set the first byte of R1 (result of execution) in R1. 
        RTS                   ; Return to the address where the function was called. 
  
         .SECTION  B,DATA,ALIGN=4 
PARM:       .BLKL   2               ; Parameter block area 
 |