PowerBASIC Forums
  Programming
  InLine Assembler (Page 3)

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone!
This topic is 3 pages long:   1  2  3 
next newest topic | next oldest topic
Author Topic:   InLine Assembler
Stavros A Petridis
Member
posted May 30, 2002 07:48 AM     Click Here to See the Profile for Stavros A Petridis     Edit/Delete Message   Reply w/Quote
Bern,
Brilliant idea,but i am not sure if this technique is cross-platform safe (pb/cc 2.0 ,2.11 3.0 - pb/dll 6.11 etc)
Maybe PB will change (or has changed between versions) the way that assigns register vars to specific cpu registers.
I am using this routine with pb/cc and pb/dll.

Any thoughts ?

Regards

Stavros

------------------

IP: Logged

Bern Ertl
Member
posted May 30, 2002 08:05 AM     Click Here to See the Profile for Bern Ertl     Edit/Delete Message   Reply w/Quote
Excellent question Stavros. I don't have an answer. We'll need
someone from PB to confirm/answer if it is safe to rely on the
current register assignments for future versions of the compiler.

I don't have PB/CC currently, so I haven't tested with it. You
should be able to modify my sample code to PRINT instead of MSGBOX
and see if it behaves the same. I would expect that it does.

------------------
Bernard Ertl

IP: Logged

Stavros A Petridis
Member
posted May 30, 2002 08:28 AM     Click Here to See the Profile for Stavros A Petridis     Edit/Delete Message   Reply w/Quote
Bern,
The results of your test program are the same in PB/CC 2.11 too.
My fear remains that some day there will be an Episode 9 that will change this .

Regards

Stavros


------------------

[This message has been edited by Stavros A Petridis (edited May 30, 2002).]

IP: Logged

Tom Hanlin
Member
posted May 30, 2002 12:19 PM     Click Here to See the Profile for Tom Hanlin     Edit/Delete Message   Reply w/Quote
The way REGISTER assignments are handled may change in the future.
It's safe technique, if you can rely on using a specific compiler
version-- that is, we're obviously not going to change the code
for PB/DLL 6.11, for example. To put it another way, the problem
lies in "future-proofing".

Considering that they're likely to make no appreciable difference
in speed, I'd be inclined to avoid such shortcuts.

------------------
Tom Hanlin
PowerBASIC Staff

IP: Logged

Bern Ertl
Member
posted May 30, 2002 12:37 PM     Click Here to See the Profile for Bern Ertl     Edit/Delete Message   Reply w/Quote
Thanks Tom.

I'll be sure to test PB7 and future compilers for any changes.

------------------
Bernard Ertl

IP: Logged


This topic is 3 pages long:   1  2  3 

All times are EasternTime (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | PowerBASIC BASIC Compilers

Copyright © 1999-2005 PowerBASIC, Inc. All Rights Reserved.


Ultimate Bulletin Board 5.45c