* Flt40 - 11/40 floating point speed up assembly language massager
* This program takes a temporary file from the C compiler
* and massages it by adding explicit subroutine calls to the floating
* point interpreter to prevent traps to the system. The resulting
* code will run faster since the system overhead of interpretation
* is eliminated. Note that leading tabs are not allowed on input lines.
perror("FLT40 FILEI FILEO", "");
if ((fp1
= fopen(file1
, bufi
)) < 0)
perror("Can't open file", file1
);
if ((fp2
= fcreat(file2
, bufo
)) < 0)
perror("Can't create", file2
);
while (getline(buf
) > 0) {
outstr(".globl\tfpjsr\n");
outstr("jsr\tpc,fpjsr;");
register char *aptr
, *bptr
, *cptr
;
for (aptr
=s1
; *aptr
!='\0'; aptr
++)
for (aptr
=s1
; aptr
!=bptr
; aptr
++)
for (aptr
=bptr
; *aptr
!='\0'; aptr
++)
for (aptr
=bptr
; *aptr
!='\t'; aptr
++)
for (aptr
=bptr
; *aptr
!='\0'; aptr
++)
while ((c
= *aptr
++) != '\0')
for (i
=0; i
<(sizeof ops
)/2; i
++)
while ((c
= getc(bufi
)) > 0) {
register char *aptr
, *bptr
;
printf("%s %s\n", s1
, s2
);