CS计算机代考程序代写 algorithm assembly ;Xuechao Li

;Xuechao Li
;zzz0001
;xuechaoli.asm
; Dr. Li helped me debug a syntax error in my ¡°for¡± loop. ;I used Wikipedia.org to learn how a genetic algorithm works.
;I spoke with Bob Smith in the class about identifying objects in Assembly Language.
.386
.model flat,stdcall
.stack 4096
ExitProcess proto,dwExitCode:dword
.data
shift dword 3
input byte 5,0ah,3,6,0ch
output byte ………….. .cod e
main proc
;This loop will iterate length – shift times. ;(this loop will place the ‘non-wraped’ values) ;Start reading from input at 0 ;Start writing at shift
l1:
;Move the value from input into al ;Move the value from al into output ;Increment the input index
;Increment the output index loop l1

l2:
loop l2
;This loop will iterate shift times
;Start writing at index 0
;Start reading at index length – shift. ;(this loop will place the ‘wrapped’ values)
;Move the value from input into al
;Move the value from al into output ;Increment the input index
;Increment the output index
;You are encouraged to create a third loop to inspect the elements in your array.
invoke ExitProcess, 0 main endp
end main

Leave a Reply

Your email address will not be published. Required fields are marked *