Assembly Language StepbyStep Programming with DOS and Linux 2nd Ed [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Assembly Language StepbyStep Programming with DOS and Linux 2nd Ed [Electronic resources] - نسخه متنی

Jeff Duntemann

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید









Other NASM-IDE Features


Most of what you do with NASM-IDE involves editing assembly language source code files, but by no means all. In this final section of the chapter I discuss some of the other things that NASM-IDE can do.


Exiting NASM-IDE


There is more than one way to get out of NASM-IDE once you're finished with the job at hand. The File menu has an Exit item, and that's the easiest to remember, and it will do the job. The shortcut for the File|Exit menu item is Alt-X:

Alt-X exits to DOS.

NASM-IDE keeps track of whether a file has been changed by you since the last time it was saved to disk. If you attempt to exit NASM-IDE with unsaved changes on deck, NASM-IDE will bring up a dialog box asking if you want to save your changes. Most of the time you do—and in most cases you'll click the Yes button. But other occasions might arise when the best thing to do is abandon a changed file and start again. The most common example of this is a careless Replace all command that went through your entire file and did a lot of unintended and difficult-to-reverse things. The best thing to do in such a case is leave NASM-IDE without saving the damaged file, and then coming back in with the most recent copy. This is another good reason to save often: You don't want to abandon a bad "Replace all" change (what some programmers have with grim remembrance come to call a "search and destroy") along with two hours' worth of useful work.

Save often. And know when not to save. It's all part of the game.


Changing the Display Size


By default, NASM-IDE brings up a traditional 25-line by 80-character DOS text screen. This isn't a lot of room to move, especially when virtually every modern display adapter is capable of showing you either 43 lines (on some ancient hardware) or 50 lines on a text screen. When I use NASM-IDE in my own work, I use 50 lines, every time.

Setting it up is easy. Pull down the Options|Environment menu item. The dialog box shown in Figure 5.9 will appear. The top pane governs your screen size. The default is 25 lines, but you can check 43/50 instead by clicking on the 43/50 lines button. Then when you click on OK, the screen size will change immediately.


Figure 5.9: The Environment Options dialog box.

What it changes to depends on your hardware. If you have an EGA (Enhanced Graphics Adapter) (which is most unlikely in the year 2000), you'll get a 43-line screen. If you have a VGA (Video Graphics Array) or anything more recent than the VGA, you'll get a 50-line screen. Note that these are mutually exclusive; a single system cannot (as far as I know) let you choose from 43 lines or 50 lines. You get the big screen, however many lines that works out to on your particular hardware.



DOS Shell


People who have grown up using nothing but Microsoft Windows have a little trouble sometimes understanding what a DOS shell is or why it's useful. The answer, of course, is that there was a time when we didn't have Windows and couldn't just click on a window and open up another program without closing the first one.

But a DOS shell was a very handy thing to have in the DOS era, and NASM-IDE provides one. If you select the File|DOS shell menu item, NASM-IDE will tuck itself away and open up a DOS shell. It's like exiting NASM-IDE without really exiting it. You can run DOS programs, look at and copy files, and so on. When you're done, you simply type "exit" and press Enter and in a pop you're back inside NASM-IDE as though you'd never left.

This is still useful for doing things like invoking your linker, since NASM-IDE doesn't do that for you. I return to the DOS shell when we discuss linking modular files later in this book.


/ 166