home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.update.uu.se
/
ftp.update.uu.se.2014.03.zip
/
ftp.update.uu.se
/
pub
/
rainbow
/
msdos
/
decus
/
RB128
/
ex1.txt
< prev
next >
Wrap
Text File
|
1995-06-04
|
602b
|
32 lines
/ Lets begin with a
/ simple program
/
/ in 'pseudo-Pascal':
/ result:=0;
/ for ndx:=1 to 10 do
/ result:=result+ndx;
*20
ndx, 0 /here are 'globals'
result, 0
*200
/ here is standard start
/ location for code
cla iac
dca ndx /set ndx to 1
dca result / & result to 0
loop, tad ndx
tad result
dca result /accumulate sum
iac
tad ndx
dca ndx /increment count
tad ndx
cia
tad dec10 /test against limit
sma cla
jmp loop
hlt
dec10, 0012
$