Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-06

rewritng function

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

mokashe.ram

Hi eveyone,

please help me on rewriting below fixing using any other workaround..as i have already gone through my post but still i am not able to fix this MEM issue.....this is on ly one issue which i amnot able to fix yet.....

FUNCTION error_message_already_written : BOOLEAN;
BEGIN
   *error_message_already_written:=MEM[$b800:3681]
=message_background_colour*16+error_message_colour; *END;
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/rewritng-function-tp5719635.html Sent from the Free Pascal - General mailing list .

Reply by email

Jonas Maebe
to mokashe.ram
mokashe.ram wrote 11 lines
please help me on rewriting below fixing using any other workaround..as i have already gone through my post but still i am not able to fix this MEM issue.....this is on ly one issue which i amnot able to fix yet..... FUNCTION error_message_already_written : BOOLEAN; BEGIN *error_message_already_written:=MEM[$b800:3681] =message_background_colour*16+error_message_colour; *END;

You cannot just change this one single statement to use the video unit without changing the rest of the program. Well, you can, but it won't do anything. The video unit does not automamagically know what has been written to the screen in other code.

Consider rewriting the logic of this code (keep track via a variable whether the error message has already been written) instead of trying to literally translate this hack.

Jonas

Reply by email

Tomas Hajny
to Jonas Maebe
Jonas Maebe wrote 24 lines
On 23 Jun 2014, at 09:01, mokashe.ram wrote: > please help me on rewriting below fixing using any other > workaround..as > i have already gone through my post but still i am not able to fix this > MEM > issue.....this is on ly one issue which i amnot able to fix yet..... > > FUNCTION error_message_already_written : BOOLEAN; > > BEGIN > > *error_message_already_written:=MEM[$b800:3681] > > =message_background_colour*16+error_message_colour; *END; You cannot just change this one single statement to use the video unit without changing the rest of the program. Well, you can, but it won't do anything. The video unit does not automamagically know what has been written to the screen in other code. Consider rewriting the logic of this code (keep track via a variable whether the error message has already been written) instead of trying to literally translate this hack.

Well, the hack may be reproducible _if_ the output to that place (1,23) was performed using unit Video. However, I suspect that it wasn't done that way (as suggested by the other question about units Video and Crt) and then it's indeed impossible (without resorting to platform specific solutions for reading the screen console content).

Tomas

Reply by email