Scripting and Little Man Computer

Verified

Added on  2019/09/16

|2
|399
|378
Practical Assignment
AI Summary
This practical assignment consists of three parts. Part (a) requires creating a DOS batch script to recursively back up files from a specified directory, creating a new directory called 'BackupFolder' with the same subdirectories, and then listing all files recursively within 'BackupFolder'. Part (b) mirrors this task but uses a Bash/Linux script. Both parts require screenshots of the script, directory listings before and after execution, and a detailed explanation of each command. Part (c) involves writing a Little Man Computer program to take two numbers from the IN-TRAY, calculate their sum, and display the result in the OUT-TRAY. Each instruction in the Little Man Computer program must be commented.
Document Page
PUT ALL YOUR ANSWERS IN THE ACCOMPANYING WORD DOCUMENT TEMPLATE.
1
.
(a) Write a DOS Batch script to automatically recursively backup
files from a specified directory (and all its sub-directories), to
a newly create directory called BackupFolder (with the same
sub-directories). Finally list all the files recursively in the new
BackupFolder.
Provide screengrabs of the script file, a directory listing before
you run the script, a directory listing after you run the script,
and at least 150 words explaining how you figured out how to
make this work, and what each command does.
1
.
(b) Write a Bash/Linux script to automatically recursively backup
files from a specified directory (and all its sub-directories), to
a newly create directory called BackupFolder (with the same
sub-directories). Finally list all the files recursively in the new
BackupFolder, and what each command does.
Provide screengrabs of the script file, a directory listing before
you run the script, a directory listing after you run the script,
and at least 150 words explaining how you figured out how to
make this work.
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
1
.
(c) The Little Man model uses a single-digit op-code and a 2-digit
memory addressing and has the following instructions defined
where the address portion is shown as xx
OpCod
e
Instruction Description
1xx ADD Add the value of a given memory location to
calculator
2xx SUBTRACT Subtract the value of a given memory location to
calculator
3xx STORE Copy the value from the calculator into a given
memory location
5xx LOAD Copy the value from a given memory location into
the calculator
6xx BRANCH Unconditional branch. Set the Program Counter to
value xx
7xx BRANCH IF
ZERO
Conditional branch. If the accumulator is zero,
branch to xx
8xx BRANCH IF
POSITIVE
Conditional branch. If the accumulator is positive,
branch to xx
901 INPUT Get the value from the IN-TRAY and put it into the
calculator
902 OUTPUT Put the value in the calculator into the OUT-TRAY
000 HALT Take a break
Write a program using these codes to take two numbers which
are contained in the IN-TRAY and display the sum (+) of
those numbers in the OUT-TRAY. Comment every instruction
(
chevron_up_icon
1 out of 2
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]