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: firstname.lastname@example.org [SMTP:email@example.com] > 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: > firstname.lastname@example.org > +--- +--- | 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: email@example.com +---
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.