Ncurses! Firehosed Again!

Jan 08, 2009 20:24


I've mentioned here that I've got a contract and have begun work on the third edition of my book Assembly Language Step By Step. The second edition was written almost exactly ten years ago, and I had mostly given up on the book as obsolete and out of print forever. My publisher most sensibly wants me to get rid of all the DOS material and rewrite ( Read more... )

programming, linux

Leave a comment

Comments 6

etfb January 9 2009, 03:30:58 UTC
Watch out for sending escape codes directly to handle screen stuff; I believe the Unix way involves a level of indirection, possibly involving some kind of file of alternative versions, along the lines of:

vt100:bold:on:ESC b 1
vt100:bold:off:ESC b 2
vt102:bold:on:ESC [ 31 m
vt102:bold:off:ESC [ 32 m

... and so on, and you're expected to go through some kind of intermediary to use this. Oh, and it may have all changed to do it some other way. All I know is: emitting CHR$(27) + "[0m" is a no-no in the Linux world...

Reply

jeff_duntemann January 9 2009, 03:41:09 UTC
I think it depends on how deep into the VT1XX feature set you want to go. Ncurses is the preferred mechanism, and it handles detecting which spec you've got in your window and how to deal with the quirks of that particular spec. However, I've had no problems clearing the screen and steering the text cursor around by issuing naked escape sequences, and that may be all I need to do in the early examples. I'll leave reverse video, bolding, windowing, and so on to ncurses.

Reply


etfb January 9 2009, 03:32:22 UTC
Oh, and: where did you hear about Gambas? Was it via my LJ, or have you been looking at it earlier and (*sniff*) didn't tell me? Could I have been saved several evenings of the awful KDevelop and the unusable Mono if I'd known?

Reply

jeff_duntemann January 9 2009, 03:36:53 UTC
No, this one was all your fault: I read it here on a post of yours, but only got around to trying it about a month ago. It's not yet bubbled up to the top of my list of things to post about, but when I do, you will definitely get credit.

Reply

jeff_duntemann January 9 2009, 03:50:18 UTC
I've never tried Mono because I have little interest in learning .NET at this point. As for KDevelop, it strikes me as less versatile than Eclipse and nowhere near as mature, but in truth I didn't spend much time on it.

Reply


cutriss January 9 2009, 03:37:32 UTC
Huh. All this time I've been following your posts since that one with the networking adapters...and I didn't realize I owned one of your books. :P

I own the 2nd edition of your Assembly Language: Step by Step book. It was quite good.

Reply


Leave a comment

Up