ZX Power #01
11 октября 1996 |
|
Desktop - Short description: A macro-assembler debugger "ALASM 2.8".
Shadow macro assembler, debugger ALASM 128/512 v2.8 Brief description of functional opportunities. Contents: 1. Memory Allocation 2. COLD START 3. TEAM ENVIRONMENT ASSEMBLER 4. EDITOR COMMANDS 5. Assembler directives 6. Compiler Error 7. In the next version ________________________________ 1. Memory Allocation Allows you to work simultaneously multiple texts, located in different pages of user memory. The transition from one page to edit the other is performed by entering commands PAGE [page] of the working line asemblera. Number texts that can handle ALASM, depends only on memory on your computer. Changes in the assembly are numbered mask, the maximum value output to port # 7FFD to switch pages. 2. COLD START When you run the assembler from TR-DOS screen is cleared and it author entry appears, then performed a memory test on the two older and three younger bit port # 7FFD. Its results are displayed in form XXX kb mask XX. The numbers indicate how much memory is available assembler on your computer and which bits of the port of entry # 7FFD responsible for access. For these bits masked operand PAGE. Lower memory test output HELP, containing a list of assembly instructions and his editor. Hotkeys these teams made in the title mode. Below are invited to click CS / 0 to start the SETUP or for more information. SETUP menu will allow you to change the visual konfigurativnye and parameters of the assembly and, if desired, burn them to disc. All changes made to the SETUP, written directly into the body monoblock assembly "alasm.C". Options run the SETUP or for more information available only at cold start. After appropriate Posts pressing any key will clear the screen and output to a working string assembly. 3. TEAM ENVIRONMENT ASSEMBLER Wednesday assembler has its own command system, most of which are compatible with the teams TASM2.0. A list of these commands can be obtained on the screen by pressing klazhishi "H" (HELP). Enter the command you want by clicking the Latin letters contained in the composition of this team form of capital. In this case, the commands displayed in the operating line, after which, if necessary, waiting for input operands or, depending on the destination, confirm by pressing ENTER. After entering it duplicated in the working screen and holds. In the case of invalid operand is displayed a message. Executing any command can be interrupted by pressing the BREAK. If the result of the command may be lost text, then if it has been changed, you are request for its preservation: File has been changed. Save (Y / N)? In command system environment assembly include: Help Format: HELP Displays the list of commands available in assembler and editor. HELP command does not contain operands and does not need to be confirmed by pressing ENTER. Quit Format: QUIT [e] [Home] Exit the assembler. In the case If not specified, exits through the bottom of the stack in Otherwise, by unconditional jump to the address provided. Parameter "page" displays the port # 7FFD with setting a bit 4 (default is 0). As the parameters "Address" and "page" can be use labels or containing arithmetic expressions. Debug Format: DEBUG Exit the debugger STS. In the absence of a display page 7 the corresponding message. If before entering this command was compiled text then the address pointer debugging monitor will be recorded address of the last ORG. In this case, typing in the debugger SS / 5, you get the ability to debug your program, watching the screen names labels on their addresses. Run Format: RUN [address] [Home] Performs the same action that and the command QUIT, but before that record in the stack return address resident module assembler that allows you to return to the assembly of startup programs team-RET. By default, the "address" is set to the latest directive ORG, and parameter "page" - 0. Work Format: WORK [filename [. Ext]] Download the file in the current working page. The default is expanding "H". "Filename" may be a mask. In this case, will be loaded the first file that it satisfies. If the parameter "Filename" is not entered, the user can select a file from a directory current drive by selecting it cursor from the list of files appears at the top of the screen. Catalogue Format: CATALOGUE [mask] The default is "*.*" (All files). Displays directory of the drive. Format mask is defined as follows: mark "?" determines that the position can be any character. An asterisk specifies that, starting from this position, All characters can be set arbitrarily. Upon reaching the limiter (the symbol "." Or end of line) is assumed that the rest of the line is filled with a space character. nUmbers Format: NUMBERS [option] Change the number system display numerical information. "Parameter" is one of two expressions: "DEC" or "HEX". Name Format: NAME newfilename [. Ext] Change the file name to something new. By default is expanding "H". "Newfilename" - a new name file. Print Format: PRINT [bytes list] Displays the port ZX-LPRINT tekuschiytekst the interim conclusion given a list of bytes. Bytes specified using a comma. Edit Format: EDIT [filename] Go to edit the file in the current page. In the case If the option "filename" file with this name is loaded the current page. If the file is the disk can not be found in the current page creates a new file introduced by name. Merge Format: MERGE filename Podgruzka text file ALASM format to the current file. The parameter "filename" is optional. counT Format: COUNT arithmetic. expression Computes the specified arithmetic expression. Calculation result is displayed in decimal, and hexadecimal systems. As the parameters Arithmetic expressions can used tags, their senior and low byte. sYmbol Format: SYMBOL [mask] Displays the list of labels satisfying the "mask". The command is executed only in If prior to this was a compilation. As attribute tags can be displayed the following message: number and value labels defined lennoe when compiling; NoDef-label has not been determined, but has been used; Macro-label is block name makroopredele of; Wrong-format label is not defined component due to errors modulation. Assemble Format: ASSEMBLE Produces a compilation of text the current page, starting with the first row. In the process of compiling the screen displays the number of compiled lines for control hangs the machine. By After compiling the screen the following message: Symbols: AAAAA-BBBBB Said difference is a number of free memory in the page allotted for the table tags. If table tags divorced on different pages, setting AAAAA specifies the address of the last record in POST SYMBOLS PAGE, and the parameter BBBBB - in SYMBOL LIST PAGE; Time = XXX.XX This number represents the the exact time of compiling the text with within hundredths of a second. Save Format: SAVE Tekusheyu file is written to disc. If a file with that name already exists on the disk, it will be deleted without any additional queries. Info Format: INFO Displays the version number list of numbers system pages memory and transfer files located throughout the computer's memory at the time of the team. paGe Format: PAGE [page number] Go to the page specified as the parameter "page". Until the next change of command parameter PAGE specified page is current and all command for the current page will be performed on it. 4. EDITOR COMMANDS At the entrance to the editing window screen is divided into two parts: the edit window and an information line, which shows the number of pages in the current file's name, amount of memory available in this page, and the number of bytes transferred into the pocket (if that number is is not equal to 0). In the same line provides the delivery service maintenance commands text. In While editing a user accessible service team servicing the text, but Unlike the assembly environment, the result of their performance is not displayed as text messages, and monitored by the user. A list of editor commands asemblera ALASM: Quit Format: Q Exit the editor in Wednesday assembler. Begin Format: B Go to the top of the text. End Format: E Go to end of text. Search Format: SEARCH [character string] Search for the string of characters text. The search starts from the position following the current cursor position and continues until end of the text. When you stop searching it can be extended by entering a combination of SS / I, and if such a command is given for end of the last line of text, search will be started from the beginning. If the "string of characters" not specified, it will be used string entered in the previous times. sYmbol Format: SYMBOL [tag name] Search tags descriptions of text. When you search for it is assumed that the first character of name tags is in the zero position. Properties - like SEARCH. coDe Format: CODE XXX> [character code] Setting the cursor position symbol with an arbitrary code typed on the keyboard. When Typing code appears symbol at the current cursor position and proposed replace it with another. If this parameter is ignored, no Action will not be made. Restore Format: R Copying the contents of his pocket at the cursor position. Line, on which the cursor is is the first since the contents of his pocket. After this operation resets the flag resolution complement the pocket. Clear Format: C Cleaning the pocket. Xreplace Format: REPLACE string1-string2 Starting from a position next for the current cursor position, search for the text "string1". Once it is detected, the message "REPLACE (Y / N / G)?". In answering "Y" current "string1" is replaced by to "string2" and the search continues. If you answer "N" search continues without change. If you answer "G" all encountered the expression of "string1" will be replaced by "String2" without any additional queries. At any time during command its implementation may be interrupted by pressing the BREAK. Line Format: LINE line number Sets the cursor on the line with the specified number. Rows are numbered from zero to the end Text increments to 1 on each line. When editing text available to the user function caused by simultaneously pressing two keys. These features speed up the editor and operands are: SS / I - continue the search; SS / D - Switching and Russian Latin registers introduce Yes textual information. Changing the case of indie induced by a modification Niemi cursor; SS / Q - delete the current row. When you run this to Manda removable stroma automatically transferred in his pocket, but only in if he does not was busy with other information tion; SS / W - insert a blank line. The current line is indented down; SS / E - Copy of the current row Key in your pocket. After this command cursor is moved is the next line; CS / 1 - tab; CS / 2 - insert a space in position cursor. The rest of the line shifted to the right; 5. Assembler directives When writing a compiler Author adhered to a set of directives taken TASM3.0. Directives, not present in the above creation, selected in accordance with international practice writing compilers, assembly language, ie by lantern and English-Russian dictionary. References compiler directives and their ALASM Description: 1. ORG address [Home] Address set compilation. By default option "page" is set to 0. As information on current address compilation can be used $ character, an equivalent treatment to zarezervivovannoy variable containing the address of the first byte command, which occurred appeal. Example: ORG # 7D19 LDIR LDIR recorded at # 7D19 ORG # C069, # 84 INDR INDR recorded at # C069 in page # 84 512y memory. 2. Label EQU value Assigns the label of a value equivalent to the parameter "value". Example: SCREEN EQU # 4000; SCREEN = # 4000 ATTRS EQU # 5B00; ATTRS = # 5B00 SCR_LEN EQU ATTRS-SCREEN ; SCR_LEN = # 1B00 3. Opreatsii highlight older and low-byte words: NUMB1 EQU # 1234 NUMB2 EQU # ABCD STBMLB EQU. NUMB1 * 256 + 'NUMB2 ; STBMLB = # 34AB MLBSTB EQU 'NUMB1 * 256 +. NUMB2 ; MLBSTB = # 12CD ; Try to avoid division by And 256 for senior buy, the one word necessary, because ; Division occupies 280 times ; More time than just opera, portable radio release of the high byte DEFB 'NUMB2 ; Absolutely equivalent, but we; Nogo faster than DEFB NUMB2/256 ; When setting byte value ; Mark the low byte is allocated ; Automatically DEFB. NUMB1 , Equivalent DEFB NUMB1 , And therefore is used mainly ; For DEFW. NUMB1 4. DISP address ; Address setting in which ; Should work program. ENT ; Assignment at work about; program compiling of the current address; function. Example: SCREEN EQU # 4000 ORG # 8000 LD HL, BEGIN ; Move the screen area LD DE, SCREEN , And run the program expectations LD BC, END-BEGIN ; [A] Interrupt LDIR CALL SCREEN DI HALT BEGIN DISP SCREEN MARKA DEC A HALT JP NZ, MARKA ; JP - not by accident RET ENT END 5. INCLUDE "name" [Home] Inclusion in the compiled file additional text block on the disc under name "name". In this case, the specified file is loaded into the page, a parameter "page" (Default - current). By After compiling the included Block compilation continues with the line that follows this directive. A feature of this directive is that the file specified in it, will not boot from the disc if it is already is necessary page. Example: LDIR INCLUDE "TOKENIZE", a OTDR INCLUDE "ALASM2" HALT First bydet compiled LDIR, then the text "TOKENIZE.H", loaded in the page 1, then OTDR, then the current page will be downloaded and compiled text "ALASM2.H", after which drive will read the main file and compilation will continue with the command HALT. 6. MAIN "file name" [Home] Specifying the master file compilation. The directive should MAIN be the first enforceable directive of the slave file. Be careful with file names contain the characters "." or "*". It is better to replace them with a "?". Example: MAIN "MAKE6? 7", 6 LDIR ; After giving the command ASSEMBLE compilation is passed to MAKE6 * 7, located in the page 6, then it is in INCLUDE is a subordinate program consisting of directives MAIN and team LDIR. In the included files MAIN ignored Therefore, after assembling LDIR will return to the main program and the continuation of the compilation. 7. INCBIN "filename" [, length] Inclusion of a program to compiled code block, on the disc under the name "file name" size "length" bytes or default of the directory data. Example: ORG # E000 LD HL, SCRFILE LD DE, # 4000 LD BC, 6144 LDIR RET SCRFILE INCBIN "SCR6? 7, 6144 To the address SCRFILE in compiled file is loaded SCR6 * 7, which after launch will be transferred to the screen. 8. DUP number Left soft brace. Indicates the beginning of the block which need to compile a "number" times in a row. EDUP Right soft brace. Indicates the end of the repeated block. Example: DUP 1932 LDI LD A, B OR C JR Z, $ +3; $ - address of the first ; Byte compiled command LD (HL), D EDUP ; Block of text between the DUP and EDUP , Will be compiled in 32-fold. 9. DEFM "character string" ["Character string"] Reservation line character. Example: DEFM "Here was the line" DEFM "symbols", "John" 10. DEFB byte [list of bytes] Reservation list of bytes. Example: DEFB "Y", 13.10, "Booty", 13.10 DEFB "was", 13.10, "dog" 11. DEFW word [word list] Reservation list of words. Example: DEFW ALASKA, BUFFER, 12, DEFW # BD15, 32767,. NUMB1 12. DEFS reps [List of bytes] List of bytes (default - 0) copied to the current address of the compilation. Number of cycles is the parameter "number of repetitions." Example: LD SP, # 5B00 DEFS 8, # C5, # D5, # E5, # F5 , Equivalent ; DUP 8 ; PUSH BC ; PUSH DE ; PUSH HL ; PUSH AF ; EDUP 6.OSHIBKI COMPILER When you compile the source Text can be issued error Compile-time associated with inattentive programmer. List of errors at compile time assembler ALASM128/512: 0 - syntax error; 1 - zarezervorovana; 2 - reserved; 3 - a short passage is incorrect 4 - reserved; 5 - reserved; 6 - re-description tags; 7 - reserved; 8 - reserved; 9 - reserved; 10 - Compiling the ROM; 11 - Invalid operation; 12 - Incorrect MACRO-operation 13 - not used; 14 - fault system stack; 15 - disk error; Error filling time: wrong short - abnormal formation generalization to a label outside "Short" field; not defined - the label is not defined at. 7. In the next version The current version does not ALASMa is the last, since the path improvement are numerous. The author will make every effort to make the assembly more convenient for the user. A list of refinements that can be expected in future versions of First of all: - Increase the speed compilation more than 2 times; - The ability to configure systems experimental data; - Increase opportunities for confit gurirovaniya; - ASSISSTANCE regime extended memory on all types of machines; - Recoding QWERTY-yaverty; - Increase in storage density text while maintaining sovmes irreversibility of formats as above down; - Directives for conditional compilation; - Macro-and makroopredele of; - Output tags not only has no, but by value; - RAMDISK files, loading emyh with INCBIN; - Elimination of drawbacks associated coupled with a single pass. Typed in a text editor ANACONDA Mishchenko Alexey (ALEM). Address: Ukraine, 310177, Kharkov-177, Ave Glory 7. Sq. 17. Phone: (0572) 70-37-49. ________________________________
Other articles:
Similar articles:
В этот день... 21 November