Question: dev T rk e: Her sat r 1 6 bit olan bir hafizada 1 0 0 0 - 1 9 9 9 adresleri aras nda
dev
Trke:
Her satr bit olan bir hafizada adresleri arasnda yer alan adet srasz tamsay dizisini eklemeli sralama insertion sort algoritmasyla yerinde sralayan bir program aadaki komut kmesini kullanarak yaznz
Komut kmesi:
ADD: topla
LDA: register'a ykle
JZ: sfr ise atla
SUB: kar
STA: hafzaya aktar
JP: pozitif ise atla
MUL: arp
PSH: stack'e push
JN: negatif ise atla
DIV: bl
POP: stack'ten pop
JMP: artsz atla
MOV: hafzada bir adresten dierine kopyala MOV K L Ldeki deeri M'ye kopyalar.
Not: Aritmetik ilemlerde iki operand bulunmaktadrrnein: ADD XY ; SUB XY; DIV XY; MUL XY
Bu komut kmesi dnda baka komut kmesi kullanamazsnz
Ben, adresler ile adreslerin iinde tuttuklar deerleri nasl kyaslayacam
rnein:
adresinde olsun
adresinde olsun
adresinde olsun
adresinde olsun
adresinde olsun
bir yandan deerinin arasnda olduunu nasl kontrol edeceim ve
bir yandan arasnda nasl insertion sort uygulayacam
english:
Write a program that sorts unordered integer arrays between in a bit memory using the insertion sort algorithm using the following instruction set.
Command set
ADD: with the ball
LDA: load to register
JZ: skip if zero
SUB: remove
STA: commit to memory
JP: skip if positive
MUL: multiply
PSH: push to stack
JN: skip if negative
DIV: divide
POP: pop from stack
JMP: skip unconditional
MOV: copy from one address to another in memory MOV K L copies the value in L to M
Note: Arithmetic operations have two operands. for example: ADD XY ; SUB XY; DIV XY; MUL XY
You cannot use any other command set except this command set!
How do I compare addresses and the values they hold?
For example
Get at
Get at
Get at
Get at
Get at
on the one hand, how do I check that the value of is between and
on the one hand, how do I apply insertion sort between
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
