------------------------------------------------------------------------------ - S-C Macro Assembler - - Makes assembly language programming on the Apple as easy as programming - - - - in BASIC - ------------------------------------------------------------------------------ Programmers Reference card Copyright S-C Software Corporation, 2331 Gus Thommasson, Suite 125, P.o. Box 280300, Dallas, Texas, 75228, (214) 324-2050 (Bill Morgan). S-C MACRO ASSEMBLER COMMANDS ASM Assemble source program AUTo Turn on automatic line numbering AUTo num Turn on automatic line numbering starting with num. COPy #1,#2,#3 Insert a copy of line #1 throught line #2 just before line #3. DELete linenum Delete specified line(s). (like basic DEL) EDIt string linenum Edit specified line(s). FASt Select normal listing speed (SPEED=255). FINd string linenum List all lines containing the specified string. HIDe Use with LOAD and MERGE commands to join 2 source prgs INCcrement Set auto-line-number increment to specified value. LISt string linenum List specified line(s). LOAD filename [DOS CMD] Load source program from disk. MANual Turn off AUTOmatic line numbering. MEMory Display memory pointers to source prg and symbols. MERge Use with HIDE and LOAD commands to join 2 source prgs. MGO expression Execute object program, starting at address specified by value of expression. MNTr Enter APPLE monitor. NEW Delete entire source prg and start over. PRT Call user printer software throught vector at $1009 or $D009. RENumber Renumber all lines of the source prg: number of the first line =1000, increment =10. RENnumber #1,#2 Renumber prg starting at #1, increment #2 RENumber #1,#2,#3 Renumber from line #3 throught the end of the source program : renumber line #3 as #1, and use inc #2. REPlace /stra/strb/ Replace all occurences of stringa with stringb. RST expression Set RESET vector to expression SAVE filename [DOS CMD] Save source prg on disk. SLOw Select slow listing speed=100 TEXT filename Write source prg to DOS text file with NO line #'s. TEXT # filename Write source prg to DOS text file WITH line #'s. TEXT / filename Write source prg to DOS text file, with (CTRL-I)'s. SYMbol Display symbol table. USR User defined command, CALL's $1006 or $D006. VAL expression Display value of expression. Linumber Parameters : "linenum" has the following options : (blank) All lines num1 That line only. num1,num2 All lines from num1 through num2. num1, All lines from num1 through the end. ,num1 All lines from beginning through num1. The numbers num1 and num2 may be line numbers, or a period; period signifies the line number of the last line entered or deleted. String Parameters: "string" as a parameter in a command means "dstringd", where "d" is any printing character except comma (,); period (.); or a digit (0-9). The string may also contain a "wildcard" character (CTRL-W). ------------------------------------------------------------------------------ EDIT MODE COMMANDS When the edit command is being used, the following sub-commands are available to modify the line being edited. CONTROL -A Begin insertion mode; characters will be inserted until another CONTROL character is typed. CONTROL -B move cursor back to beginning of the label field. CONTROL -D Delete character under cursor. CONTROL -Fx Move cursor to next occurence of "x" in line (if any). CONTROL -H (left arrow) move cursor left. CONTROL -I Destructive tab. CONTROL -L Store current edited line and start editing the next. CONTROL -M (RETURN) store the edited line. CONTROL -N Move cursor to the end of the line. CONTROL -O Begin insertion mode, but allow mext character typed to be inserted even if it is a CONTROL -CHARACTER. CONTROL -Q Finish edit mode, chopping off all characters from cursor to end of the line. CONTROL -R Restore the original line and stay in edit mode. CONTROL -T Non destructive tab. CONTROL -U (right arrow) move cursor right. CONTROL -X Abort the EDIT command. CONTROL -@ Erase from cursor to the end of the line without leaving edit-mode. ------------------------------------------------------------------------------ S-C MACRO ASSEMBLE DIRECTIVES .AS /string/ Ascii String (/ is the delimeter) .AT Ascii Terminated .BS Block Storage .DA DAta .DO expression Assemble block if expression is true. .ELSE Toggle .DO expression value. .EM End Macro definition .EN ENd of program or included section. .EQ expression EQuate expression to label. .FIN FINish conditional assembly .HS hexstring Hex String .IN filename INclude a source file during assembly. .LIST MOFF Macro LISTing OFF. (during assembly) .LIST MON Macro LISTing ON. (during assembly) .LIST OFF LISTing OFF (during assembly) .LIST ON LISTing ON (during assembly) .MA macro name MAcro definition .OR expression ORigin .PG PaGe eject .TA expression Target Address .TF filename Target File .TI expression,title Title .US whatever USer defined Expression in the operand field of directives or instructions are evaluted from left to right. Operands may be lables, decimal numbers, hexadecimal numbers, literal ASCII characteres, or *. Operands may be arith- metic (+,-,* or /). The .DA directive may be followed by one or more expressions seperated by commas. Each expression may be one of these forms : expression Two bytes, low-byte first. #expression Low-order byte only. /expression High-order byte only. ------------------------------------------------------------------------------ DOS COMMANDS RELEVANT TO S-C MACRO ASSEMBLER BLOAD filename (Aaddr)(,Ss)(,Dd)(,Vv) BRUN filename (Aaddr)(,Ss)(,Dd)(,Vv) BSAVE filename ,Aaddr,Llenght (,Ss)(,Dd)(,Vv) CATALOG (or CONTROL -C) DELETE filename (,Ss)(,Dd)(,Vv) FP IN# slot INT (language card version only) LOAD filename (,Ss)(,Dd)(,Vv) LOCK filename (,Ss)(,Dd)(,Vv) MON (C)(I)(O) NOMON (C)(I)(O) PR# slot RENAME filenamea,filenameb (,Ss)(,Dd)(,Vv) SAVE filename (,Ss)(,Dd)(,Vv) UNLOCK filename (,Ss)(,Dd)(,Vv) VERIFY filename (,Ss)(,Dd)(,Vv) ------------------------------------------------------------------------------ APPLE ][ +, e MONITOR COMMANDS All you have to do to use any of the Apple's monitor commands, is to type a "$" in front of the command you wish to execute. ------------------------------------------------------------------------------