thouse@utcsri.UUCP (D. Tennenhouse) (05/30/86)
I am trying to re-assign ConoutPtr using MSDOS Turbo Pascal. In this way, I
should be able to use my own console output driver. I was able to do this
easily in Z80 Turbo Pascal as follows:
ConOutPtr := Addr( MyOutputRoutine );
where MyOutputRoutine is a previously defined procedure.
This does not work with the MSDOS version since the addressing schemes are
different. I thought I would be able to do it like this:
ConOutPtr := Ptr( Cseg, Ofs( MyOutputRoutine ) );
but this gave me a compile time type mismatch. The Z80 way of doing it gives
a syntax error. Anyone know how to do this?? Thanks.smvorkoetter@watmum.UUCP (Stefan Vorkoetter) (05/30/86)
Try using the following:
ConOutPtr := Ofs( MyRoutine );
I don't have my Turbo Manual here, but I believe that ConOutPtr is not
a real pointer in the 8086 sense of the word (ie. segment:offset), but
rather is just an offset into the code segment. Telling it the segment
would be redundant since Turbo is limited to a single 64K code segment
anyway. I hope this is correct.
Stefan Vorkoetter (smvorkoetter@watmum.UUCP)
University of Waterloo
Waterloo, Ontario, Canada