Re: [fpc-pascal] [OT] inline procedures in TP 7.0

2020-02-17 Thread Florian Klämpfl
Am 17.02.20 um 12:31 schrieb Anton Shepelev via fpc-pascal: Florian Klampfl to Anton Shepelev: What about the other registers -- does Turbo Pascal take care of them, perhaps enveloping each expansion of an inline procedure into a POPs and PUSHes? No. Thank you for the reply, Florian. Does

Re: [fpc-pascal] [OT] inline procedures in TP 7.0

2020-02-17 Thread Anton Shepelev via fpc-pascal
Florian Klampfl to Anton Shepelev: > > What about the other registers -- does Turbo Pascal take > > care of them, perhaps enveloping each expansion of an > > inline procedure into a POPs and PUSHes? > > No. Thank you for the reply, Florian. Does that mean that I must take utmost care to preserve

Re: [fpc-pascal] [OT] inline procedures in TP 7.0

2020-02-16 Thread Florian Klämpfl
Am 16.02.20 um 22:28 schrieb Anton Shepelev via fpc-pascal: But which registers shall be preserved by inline proceudres and functions? IIRC (it is 25 years ago :)): sp and bp In this example from the manual, the SP register is not preserved within the statement: It is reset to it's value

[fpc-pascal] [OT] inline procedures in TP 7.0

2020-02-16 Thread Anton Shepelev via fpc-pascal
Hello, all I don't know a better place to ask this, and beg your pardon for an off-topic post. The Language Guide for Turbo Pascal 7.0 has this to say about `inline' statements and proceudres: When a normal procedure or function is called, the com- piler generates code that pushes the pr