Question: Write a program to find N ! . The program must contain a loop ( ! ) and produce some output. The RSC uses the
Write a program to find N The program must contain a loop and produce some output. The RSC uses the following instruction set.
The list is separated by bytecode and alternate text.
: halt,stop
: lda,ldac,ldacc
: stac,stoac,stacc,stoacc
: movac,mvac,movacc,mvacc
: movr,mvr
:jmpjump
:jmpzjumpz
mathrm : out,output,outr
: sub
: add
a:inc,inac,inacc,incacc
b : clac,clearac,clacc,clearacc
c
d:or
e:ras,ashr,asr
Of: not
VariablesStorage locations are allowed, and can be declared as follows:
var
or
var
Instructions have alternate texts you can use for readability.
LDA or or LDA var
Comments are allowed and are denoted by a semicolon.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
