RSS


[ Pobierz całość w formacie PDF ]
.htm (20 of 33) [9/30/02 08:30:48 PM] file:///E|/TEMP/Chapter%204%20Learning%20and%20Using%20Jed.htmS DXUntil the directions become automatic to your fingers (as they will, if you do enoughediting!) thinking of the magic diamond will remind you which way the cursor will movefor which keypress.When you move the cursor to the bottom of the screen and press Ctrl+X one more time,the screen will scroll.All the lines on the screen will jump up by one, and the top linewill disappear.As long as the cursor is on the bottom line of the screen and you continueto press Ctrl+X, the screen will scroll upward.If use Ctrl+E to move the cursor back inthe opposite direction (upward) until it hits the top of the screen, continually pressingCtrl+E will scroll the screen downward one line per Ctrl+E.One Word at a TimeJED will also move the cursor left or right one word at a time: pressing Ctrl+A orCtrl+Left Arrow moves the cursor Left one word; while pressing Ctrl+F or Ctrl+RightArrow moves the cursor Right one word.More hints are given here, since the A key is on the left side of the magic diamond, andthe F key is on the right side of the magic diamond.One Screen at a TimeIt is also possible to move the cursor upward or downward through the file one entirescreen at a time."Upward" in this sense means toward the beginning of the file;"downward" means toward the end of the file: pressing Ctrl+R or PgUp moves the cursorUp one screen; while pressing Ctrl+C or PgDn moves the cursor down one screen.A screen is the height of your CRT display (25, 43, or 50 lines, depending on whatdisplay adapter is installed and what font is currently loaded) minus two lines for theeditor status line at the top of the screen and the prompt bar at the bottom of the screen.Moving the Cursor by Scrolling the ScreenI have described how the screen will scroll when you use the one-character-at-a-timecommands to move upward (Ctrl+E) from the top line of the screen or downward(Ctrl+X) from the bottom line of the screen.You can scroll the screen upward ordownward no matter where the cursor happens to be by using the scrolling commands:file:///E|/TEMP/Chapter%204%20Learning%20and%20Using%20Jed.htm (21 of 33) [9/30/02 08:30:48 PM] file:///E|/TEMP/Chapter%204%20Learning%20and%20Using%20Jed.htmpressing Ctrl+W scrolls the screen Down one line; while pressing Ctrl+Z scrolls thescreen Up one line.When you scroll the screen with these commands, the cursor "rides" with the screen as itscrolls upward or downward, until the cursor hits the top or bottom of the screen.Thenfurther scrolling will make the screen slip past the cursor.The cursor will always remainvisible.These are all of the cursor control commands that can be accomplished in one Ctrlkeystroke.There are a few more that are accomplished by holding theCtrl key down andpressing two keys in succession.You must hold the Ctrl key down through bothkeypresses!Moving to the End of a LineNo matter where your cursor is on the screen, it is always within a line, even if that linehappens to be empty of characters.The editor provides two commands to move thecursor either to the beginning (left end) of the line (screen column 1) or to the end of theline, (the position following the last visible character on the line): pressing Ctrl+Q/S orHome sends the cursor to the Beginning of the line; while pressing Ctrl+Q/D or Endsends the cursor to the End of the line.Moving to the End of a FileThe last set of cursor control commands I'll describe takes the cursor to the beginning ofthe file or to the end of the file.If the file you are editing is more than a few screens long,the following commands can save you a great deal of pounding on the keyboard:pressing Ctrl+Q/R or Ctrl+PgUp sends the cursor to the Beginning of the file; whilepressing Ctrl+Q/C or Ctrl+PgDn sends the cursor to the End of the file.Because all of the current file is in memory all of the time, moving between the ends ofthe file can be done very quickly.The Status LineAt the very top of JED's Edit screen is the status line, which provides you with someimportant information while you are editing.A typical instance of the status line lookslike this:Line 1 Col 1 Insert Indent C:EAT2.ASM 09:04:45file:///E|/TEMP/Chapter%204%20Learning%20and%20Using%20Jed.htm (22 of 33) [9/30/02 08:30:48 PM] file:///E|/TEMP/Chapter%204%20Learning%20and%20Using%20Jed.htmWhile you were moving the cursor around, the line and column numbers werecontinually changing to reflect where the cursor was in the file.The column numberreflects the position of the cursor within its line; the line number indicates which line inthe file contains the cursor, counting from the beginning of the file, not from the top ofthe screen.At the other end of the status line is the name of the current file.Insert and Indent, described earlier in this chapter, are the names of two toggles.A toggleis a condition that exists in one of two different states.A toggle is like a switchcontrolling the lights in a room; the switch is either on or off.Insert determines how newly typed characters are added to your work file.When Insert ison (that is, when the word Insert appears in the status line) characters you type areinserted into the file.The characters appear over the cursor and immediately push thecursor and the rest of the line to the left to make room for themselves.The line becomesone character longer for each character that you type.If you press Enter, the cursormoves down one line carrying with it the part of the line lying to its right.When Insert is off (i.e., if the word Insert is not displayed in the status line) charactersyou type will overwrite characters that already exist in the file.No new characters areadded to the file unless you move the cursor to the end of the line or the end of the fileand keep typing.If you press Enter, the cursor will move down to the first character ofthe next line down, but nothing else will change.A line will only be added to the file ifyou press Enter with the cursor on the last line of the file.Turning Insert on and off is done by pressing Ctrl+V.Indent is also a toggle, which indicates whether JED's auto-indent feature is on or off.When Indent is on, the cursor will automatically move beneath the first visible characteron a new line when you press Enter.In other words (assuming that Indent is on), giventhis little bit of text on your screenAdjust:MOV AX, [BP] + 6SUB AX, Increment_ " 1355.3 Registers and Memory Addresses >" 141As comedian Bill Cosby once said, "I told you that story so I could tell you this one."We're pretty close to half finished with this book, and I haven't eve begun describing theprincipal element in PC assembly language: The 8086/ 8088 CPU [ Pobierz całość w formacie PDF ]
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • nvs.xlx.pl