Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Section B: Assembly Language Programming ( 1 5 marks ) Write a complete Wombat 2 assembly language main and subprogram. The main program tests the

Section B: Assembly Language Programming
(15 marks)
Write a complete Wombat 2 assembly language main and subprogram. The main program tests the subprogram: it reads in exactly one integer, checks that the integer is valid input, calls the subprogram and writes out the result. The subprogram must compute the function: f(n)=6+nf(n-1) where f(0)=4. The program must be properly commented.
Appendix - Wombat Machine Instructions Summary
In the following description, "c(m)" refers to the contents of memory location "m", and "=>" indicates data movement (copy).
\table[[Mnemonic,Opcode,Decimal,Description],[stop,0000,0,Stop execution],[load,0001,1,c(m)=acc
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions