Thread View: net.lang.pascal
2 messages
2 total messages
Started by D. Tennenhouse
Thu, 29 May 1986 21:06
MSDOS Turbo Pascal: re-assigning conOutPtr
Author: D. Tennenhouse
Date: Thu, 29 May 1986 21:06
Date: Thu, 29 May 1986 21:06
16 lines
1203 bytes
1203 bytes
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.
Re: MSDOS Turbo Pascal: re-assigning conOutPtr
Author: Stefan Vorkoetter
Date: Fri, 30 May 1986 13:43
Date: Fri, 30 May 1986 13:43
12 lines
1120 bytes
1120 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads