mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-31 21:09:38 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
		
			680 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			680 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
| { THE OUTPUT is incorrect but the }
 | |
| { parsing is correct.             }
 | |
| { under nasm output only.         }
 | |
| { works correctly under tasm/gas  }
 | |
| { other problems occur with other }
 | |
| { things in math.inc              }
 | |
| { pp -TDOS -Ratt -Anasm bug0043.pp }
 | |
|     procedure frac;
 | |
| 
 | |
|       begin
 | |
| 	 asm
 | |
| 	    subl $16,%esp
 | |
| 	    fnstcw -4(%ebp)
 | |
| 	    fwait                    { unknown instruction }
 | |
| 	    movw -4(%ebp),%cx
 | |
| 	    orw $0x0c3f,%cx
 | |
| 	    movw %cx,-8(%ebp)
 | |
| 	    fldcw -8(%ebp)
 | |
| 	    fwait                    { unknown instruction }
 | |
| 	    fldl 8(%ebp)
 | |
| 	    frndint
 | |
| 	    fsubl 8(%ebp)
 | |
| 	    fabsl
 | |
| 	    fclex
 | |
| 	    fldcw -4(%ebp)
 | |
| 	    leave
 | |
| 	    ret $8
 | |
| 	 end ['ECX'];
 | |
|       end;
 | |
| 
 | |
| Begin
 | |
| end.
 | 
