On 02Jun2008 00:57, Gene Heskett <gene.heskett@xxxxxxxxxxx> wrote: | On Sunday 01 June 2008, Cameron Simpson wrote: | >And it seems I typed "L1BAE" and you typed "L1A8E". Sorry, that will | >have wasted your time. Corrected in the examples below. | > | Mochs Nichs, it worked, and about 450-500 bytes of junk code has now been | removed from a 6k relocatable object. The original coder from 25 years ago was | either fighting with a broken assembler, or somehow used the z-80 as a model | for 6809 code, there was z-80 coding style trash all over it, Hey, I _liked_ the Z80! How many other machines have an LDIR instruction? Admittedly, the Z80 implemented that rather tackily inside... What constitues "z-80 coding style trash", btw? | and strings of | code 10 to 40 bytes long that had an rts or a bra to someplace else above them | with no label, meaning it will never be executed, so why is it there? Leakage? How smart is this disassembler? Are there any jump tables? Maybe it's "I'm changing the way I'm doing this but want the old code handy for later just in case". Even today I have a bit of python code I'm hacking on that has a bit of this: if True: do things the cool new way else: the old clunkiness, kept around because I wanted to remember how it was done Hard to say how much hard-to-remember stuff can be packed into 10 bytes of machine code though... | I can | only guess 25 years after the fact. | Having programed in assembly or even just a hex monitor on the RCA-1802, the | z-80, and the motorola 6809 which hitachi turned into a much smarter 6309, the | 1802 is ok but different, the 6809's are 1.5 star genius's, the 6309 is a 2 | star, and z-80 I can only describe as drain bamaged. I didn't do a lot of 6809 and have never used a 6309. | | >I see someone else has suggested: | > :g/L1A8E/s//isspace/g | >which in this case is semanticly equivalent but internally different. | | And that syntax is what I used for the last 4 hours. I'm not done by a long | shot, but this sure helps. If I can get it to build and run exactly as before, | but without all this guys trash, a printout will be a lot more useful in terms | of deciphering what its doing. You may want to turn this into a sed script then, if the label names are reliable (I guess from the same disassembly run they will be). On the other hand I don't see that a sed script will be any better than just progressively editing your listing anyway, as I presume you are doing. | >Ok. You might also want to beef up the regexp, thus: | > :%s/\<L1A8E\>/isspace/g | >The causes the L1A8E to have "word boundaries" at each end, so that | >FOOL1A8EBAR will not match the regexp. It looks like your disassembler | >generated labels won't have this trouble, but I like to be cautious. | | Thanks for the warning, although I did get an example of that while searching | for a marker I had added, 5 dashes forgetting a previous editor had wrapped | some of his comments in ;---------------------- style markers, so I had to | change the search string to -----L which only matched the label I'd marked. Indeed. Cheers, -- Cameron Simpson <cs@xxxxxxxxxx> DoD#743 http://www.cskk.ezoshosting.com/cs/ Sam Jones <samjones@xxxxxxxxxxx> on the Nine Types of User: Mad Bomber - "Well, I hit ALT-f6, shift-f8, CNTRL-f10, f4, and f9, and now it looks all weird." Advantages: Will try to find own solution to problems. Disadvantages: User might have translated document to Navajo without meaning to. Symptoms: More than six stopped jobs in UNIX, a 2:1 code-to-letter ratio in WordPerfect Real Case: One user came in complaining that his WordPerfect document was underlined. When I used reveal codes on it, I found that he'd set and unset underline more than fifty times in his document. -- fedora-list mailing list fedora-list@xxxxxxxxxx To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list