-
Notifications
You must be signed in to change notification settings - Fork 0
Home
#The VC-3600 Assembly Language The following is a summary of the assembly language for the VC3600.
##Statement Format:
An assembly language statement consists of from one to three fields. These are:
- Label - used to reference the statement. It is optional.
- Labels start in column 1, all other fields separated by blanks or tabs.
- Operation Code - a symbolic name for the number machine language op code.
- Operand - Used to supply additional information. For a machine language instruction this a label.
##Symbolic Operation Codes:
01 ADD
02 SUB
03 MULT
04 DIV
05 LOAD
06 STORE
07 READ
08 WRITE
09 B
10 BM
11 BZ
12 BP
13 HALT
##Symbols Labels and operands are from 1 to 10 characters in length, the first of which is a letter and the remaining may be letters and digits.
##Addresses An address may be specified by a label.
##Assembler Language Instructions
-
DC- define constant. The constant is a decimal integer placed in the operand field. -
DS- define storage. The operand specifies the number of words of storage to be set aside. -
ORG-define origin. The operand specifies the address at which the translation of the next instruction will be generated, -
END– indicates that there are no additional statements to translate.
##Comments Data after a ";" is a comment.
- Comments may appear anywhere within an instruction or by themselves.
- Blank lines are ignored.
##Case Sensitivity
- All symbols will be case sensitive.
- Operation codes may be written in upper or lower case or some combination of the two.
###Example
The following is an assembler language program which will read in a number "n" and then compute and print the value of n!.
org 100
read n
more load n; This is a comment
;Here is a comment that sit on its own line.
mult fac
store fac
load n
sub one
store n
bp more
write fac
halt
n ds 100; just to show that you code can handle big areas.
fac dc 1
one dc 1
test dc 1234 ; show your program can handle big constants.
end