morgan@brambo.UUCP (Morgan W. Jones) (01/28/88)
Here's another one of those Amiga Quirks for the Gurus to have fun with: In the Libraries manual, the man page for ExNext explains that in order to read the files of a directory you call Examine to get a FileInfoBlock, and pass this and the Lock to ExNext until it fails. I've done this (A2000 & Howe's assembler), and it seems to work fine except for one small problem. The manual states that at the end of a directory, ExNext will fail and IoErr will return a code of ERROR_NO_MORE_ENTRIES. In my program, however, IoErr returns a zero at this point. But except for that, everything works fine. Any explanations? Has anyone tried to get printf (from amiga.lib) working from assembler? I've managed to get fprintf working, but printf seems to want a static long word assigned to _stdout and I can't figure out what format this is in. What does the Lattice C compiler store in stdout? -- Morgan Jones - Bramalea Software Inc. ...!utgpu!telly \ !brambo!morgan ...!{uunet!mnetor, watmath!utai}!lsuc!ncrcan / "These might not even be my opinions, let alone anyone else's."
mills-cl@carp.cis.ohio-state.edu (christopher mills) (01/30/88)
>Has anyone tried to get printf (from amiga.lib) working from >assembler? Yes. It works nice. Doesn't have to link in all of those routines to print out floats. You need to define a long, _stdout, and assign it the result of the the DOS call Output(). Likewise, getchar (actually _getchar) needs _stdin, from the Input() call. Chris Mills