Re: VIM Q again

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02Jun2008 02:09, Gene Heskett <gene.heskett@xxxxxxxxxxx> wrote:
| On Monday 02 June 2008, Cameron Simpson wrote:
| >What constitues "z-80 coding style trash", btw?
|
| Jump tables scattered around in your code, taking up valuable space cuz the 
| darned thing doesn't have a conditional long branch ability, just for starters.

Hmm. I don't seem to recall needing jump tables, but perhaps my code
was smaller than yours. In fact, I've got some z80 code right here [...]
The long jump JP command allows conditionals. The 8080 might not have;
I never used that, either.  I did have a Z80 macro for measuring the
length of the jump and using a JR instead of a JP where possible, but
JPs definitely allowed conditions.

| Restricting your conditional branches to about 126 bytes either way from the 
| current pc makes for in-elegant, messy code.  If where you want to go with a 
| conditional is 40k away, you have to hide the long branch on that same page 
| someplace.  Smart assemblers & linkers might be able to hide that from the 
| coder I suppose, but when I was carving z-80 code in 1981-2, it was with a hex 
| monitor only.  Nobody was giving away assemblers back then.  Oh, and it doesn't 
| do pcr addressing either. Once I got used to that, I don't think I could ever 
| go back to totally fixed addressing.  There be dragons.

Hmm. I was doing z80 about then and I had an assembler (hence the macro
mentioned above). This was on some TRS80s.

| >| 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?
| 
| Were, I just took them all out cuz this cpu can do conditional long branches and 
| subroutine calls & returns.

Hmm. The Z80 had calls and returns, too.

[...snip disc allocation problem description...]
| Yes, in some locales, the TRS-80 Color Computer 3 still lives.  It runs a 
| mini-unix called OS-9, multi-user/multi-tasking.  But that I expect is a bit OT 
| for this list. :)

Perhaps:-)

| Thanks again Cameron, I appreciate the help.  Too bad the man pages for vim have 
| been gutted.  Next time I get near Borders I'll check and see if Tim has a book 
| on vim.

Hmm. Everything recited so far have been generic "vi" syntax, and the
s/// syntax is straight out of ed(1) (except for the \< \>). Maybe the
POSIX stuff at www.opengroup.org will help; they have real man pages
instead of the often-travesties from the Linux world.

In fact, since Fedora and several other UNIXen have been shipping the
POSIX man page set in addition to their own (courtesy of the Open
Group) you should be able to say:

  man 1p ed
  man 1p vi

and get decent long winded manual entries for each. They're a pleasure
to read. The vi entry talks pretty much about vi's visual mode and the
reguar expression syntax, but ed goes into the commands (and a superset
of ed is available as the "ex" mode of vi).

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

They said it couldn't be done/they said nobody could do it/
But he tried the thing that couldn't be done!/He tried - and he couldn't do it.

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux