|
correct on both points. If the constant already has the full length of the field no extra code is generated for the pad, so there is no penalty. It is not run-time performance I was referring to but human maintenance time. > -----Original Message----- > From: dhandy@isgroup.net [SMTP:dhandy@isgroup.net] > Sent: Thursday, March 02, 2000 9:01 AM > To: MI400@midrange.com > Subject: Re: Critique requested for my first MI program > > Leif, > > >One subtle point: instead of the string "- " with two spaces > >it is better to use a compare with pad: > >CMPBLAP(B) OPCODE,"-", " "/EQ... > >that makes your code easier to maintain. > > In that case the string with the (now full length) three character > compare value would also need CMPBLAP(B). So does that imply that > CMPBLAP is always "better" to use when comparing with constants? > > I'm assuming here that if left without the pad and OPCODE was later > expanded to a longer length, that CMPBLA(B) ...,"SUB" would then match > any string which began with SUBxxxx. Correct? I gotta get myself one > of those MI Reference manuals... > > Back in the days when I did assembler on some other machines, I'd > consider the instruction timing differences. Today I can't imagine it > should justify a second thought from a performance standpoint. > > Doug > +--- > | This is the MI Programmers Mailing List! > | To submit a new message, send your mail to MI400@midrange.com. > | To subscribe to this list send email to MI400-SUB@midrange.com. > | To unsubscribe from this list send email to MI400-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: > dr2@cssas400.com > +--- +--- | This is the MI Programmers Mailing List! | To submit a new message, send your mail to MI400@midrange.com. | To subscribe to this list send email to MI400-SUB@midrange.com. | To unsubscribe from this list send email to MI400-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: dr2@cssas400.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.