11.07.2015 Views

Untitled - TRS-80 Color Computer Archive

Untitled - TRS-80 Color Computer Archive

Untitled - TRS-80 Color Computer Archive

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

MLXMachine Language Entry ProgramFor Commodore 64Ottis Cowper, Technical Editor"MIX" is a labor-saving utility that allowsalmost fail-safe entry of Commodore 64machine language programs.Type in and save some copies of MLX—you'll want to use it to enter future machine langauge (ML) programs fromCOMPUTE!. When you're ready to enteran ML program, load and run MLX. Itasks you for a starting address and anending address. These addresses appearin the article accompanying the MLXformatprogram listing you're typing.If you're unfamiliar with machinelanguage, the addresses (and all othervalues you enter in MLX) may appearstrange. Instead of the usual decimalnumbers you're accustomed to, thesenumbers are in hexadecimal—a base 16numbering system commonly used byML programmers. Hexadecimal—hexfor short—includes the numerals 0-9and the letters A-F. But don't worry—even if you know nothing about ML orhex, you should have no trouble usingMLX.After you enter the starting and ending addresses, you'll be offered the option of clearing the workspace. Choosethis option if you're starting to enter anew listing. If you're continuing a listingthat's partially typed from a previoussession, don't choose this option.A functions menu will appear. Thefirst option in the menu is ENTERDATA. If you're just starting to type in aprogram, pick this. Press the E key, andtype the first number in the first line ofthe program listing. If you've alreadytyped in part of a program, type the linenumber where you left off typing at theend of the previous session (be sure toload the partially completed programbefore you resume entry). In any case,make sure the address you enter corresponds to the address of a line in thelisting you are entering. Otherwise, you'llbe unable to enter the data correctly. Ifyou pressed E by mistake, you can returnto the command menu by pressing RETURN alone when asked for the address.(You can get back to the menu from mostoptions by pressing RETURN with noother input)Entering A ListingOnce you're in Enter mode, MLX printsthe address for each program line foryou. You then type in all nine numberson that line, beginning with the first twodigitnumber after the colon (:). Each linerepresents eight data bytes and a checksum. Although an MLX-format listingappears similar to the "hex dump" listings from a machine language monitorprogram, the extra checksum number onthe end allows MLX to check yourtyping.When you enter a line, MLX recalculates the checksum from the eight bytesand the address and compares this valueto the number from the ninth column. Ifthe values match, you'll hear a bell tone,the data will be added to the workspacearea, and the prompt for the next line ofdata will appear. But if MLX detects atyping error, you'll hear a low buzz andsee an error message. The line will thenbe redisplayed for editing.Invalid Characters BannedOnly a few keys are active while you'reentering data, so you may have to unlearn some habits. You do not type spacesbetween the columns; MLX automatically inserts these for you. You do not pressRETURN after typing the last number ina line; MLX automatically enters andchecks the line after you type the lastdigit.Only the numerals 0-9 and the letters A-F can be typed in. If you press anyother key (with some exceptions notedbelow), you'll hear a warning buzz. Tosimplify typing, a numeric keypad is nowincorporated in the listing. The keypad isactive only while entering data. Addresses must be entered with the normal letterand number keys. The figure belowshows the keypad configuration:7 84U1JAM5I2K9B6O\ Space3L0cFP•MLX checks for transposed characters. If you're supposed to type in A0 andinstead enter 0A, MLX will catch yourmistake. There is one error that can slippast MLX: Because of the checksum formula used, MLX won't notice if you accidentally type FF in place of 00, and viceED/versa. And there's a very slim chance thatyou could garble a line and still end upwith a combination of characters thatadds up to the proper checksum. However, these mistakes should not occur ifyou take reasonable care while enteringdata.Editing FeaturesTo correct typing mistakes before finishing a line, use the INST/DEL key todelete the character to the left of thecursor. (The cursor-left key also deletes.)If you mess up a line really badly, pressCLR/HOME to start the line over. TheRETURN key is also active, but onlybefore any data is typed on a line. Pressing RETURN at this point returns you tothe command menu. After you type acharacter of data, MLX disables RETURNuntil the cursor returns to the start of aline. Remember, you can press CLR/HOME to quickly get to a line numberprompt.More editing features are availablewhen correcting lines in which MLX hasdetected an error. To make corrections ina line that MLX has redisplayed for editing, compare the line on the screen withthe one printed in the listing, then movethe cursor to the mistake and type thecorrect key. The cursor left and right keysprovide the normal cursor controls. (TheINST/DEL key now works as an alternative cursor-left key.) You cannot moveleft beyond the first character in the line.If you try to move beyond the rightmostcharacter, you'll reenter the line. Duringediting, RETURN is active; pressing ittells MLX to recheck the line. You canpress the CLR/HOME key to clear theentire line if you want to start fromscratch, or if you want to get to a linenumber prompt to use RETURN to getback to the menu.Display DataThe second menu choice, DISPLAYDATA, examines memory and shows thecontents in the same format as the program listing (including the checksum).When you press D, MLX asks you for astarting address. Be sure that the startingaddress you give corresponds to a linenumber in the listing. Otherwise, thechecksum display will be meaningless.MLX displays program lines until itreaches the end of the program, at whichpoint the menu is redisplayed. You canpause the display by pressing the spacebar. (MLX finishes printing the currentline before halting.) Press space again toFebruary 1987 COMPUTE! 89

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!