Fyi Ve Completed 21 22 M Trouble 23 Code Right Jns Listinput Halt Listinput Dec 0 Loop Inp Q37069697

2.1 Inputting a list of numbers (15 marks) The first step is to input a set of numbers (number-by-number, using the Input ins

FYI: I’ve completed 2.1 and 2.2, I’m having trouble on 2.3. Thecode I have right now is:

JnS ListInput
Halt
ListInput, dec 0
loop, input / loop for input using subroutine
   skipcond 400 / skip if input is 0
   jump keep / if not 0 jump to keep
   jump endlist / if input is 0, jump to endlist
  
keep, storeI x / store indirect x
   load x
add one
store x
   load inputlist / load the input list, add one andstore
add

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.