1 >false \ flag pour reassemble PC prog %h10000 >export "D:\SUPER\COPRO\A_FPU.S" org 0 mov bx,cs mov es,bx ; es:di address to receive mov ds,bx ; ds:si address to send fwait finit ; init fpu again: mov di,real mov cx,8 ; get 8 bytes = float mov ah,4 int 060h ; get data fwait fld QWORD [real] ; load real value fwait fabs ; absolute fwait fsqrt ; square root fwait fstp QWORD [real] ; write result mov si,reel mov cx,8 ; send 8 bytes = float mov ah,5 int 060h ; send data jmp again real dq 0.0 ; space for my real number >comp %h10001 >exec "D:\SUPER\COPRO\NASM.TTP" "D:\SUPER\COPRO\A_FPU.S" >comp 1024 stallot constant STBUFFER : verif sc_check ?dup if ." Not installed " . cr else ." Installed version " pad ! 0 pad 4 + c! pad type cr then ; : install " F:\FORTH\TOOL_BOX.BIN" sc_load ?dup if ." ToolBox load error " . cr else sc_boot ?dup if ." Boot error " . cr else verif then then ; : pc_prog 0 1024 " D:\SUPER\COPRO\A_FPU" STBUFFER loadbin dup 0< if ." Load prog error " . cr else >r STBUFFER %h03000000 r> sc_sendm ?dup if ." Send prog error " . cr else %h03000000 sc_exec ?dup if ." Exec prog error " . cr else ." Program is running!" cr then then then ; \ x racine returns sqrt(|x|) : racine STBUFFER if! STBUFFER 8 sc_xsendm ?dup if ." Send error " . cr else STBUFFER 8 sc_xgetm ?dup if ." Receive error " . cr else STBUFFER if@ then then ;