Đã Đóng

assembly language -- 2

1. Write a program ArrayToStack which copies (ie, pushes) the N

elements of an array, Vector, onto the runtime stack. Vector is an array of

unsigned double-word integers.

2. Write a program StackToArray which copies back to Vector the

last N double-word elements pushed onto the stack (by some piece of code such as

ArrayToStack). StackToArray should not reverse Vector (that is, the

elements should return to their initial positions as before the execution of

ArrayToStack).

3. Write a program StackReverse which uses the runtime stack to

reverse an array Vector of N unsigned double-word integers.

4. To test these three programs, your main program should display the

following interaction with you (things in reds are your inputs). Fix the maximum

size of the array to be N = 20; thus, your runtime stack will never overflow .

1. Write a procedure called HexOutput that displays the content of

register EBX as a hexadecimal string. See the algorithm’s pseudocode in Slide-51

of Chap_06 (Lecture-9). A full solution for the binary case (BinOutput) also

appears in Slide-48 and Slide-49 of Lecture-9 (I have explained and traced this

solution in classroom).

For example: If EBX contains 1111 1110 0000 0001 1100 1000 0011 0111, then

the procedure HexOutput should display the hexadecimal string “FE01C837h”;

note: make sure that character ‘h’ is displayed at the end.

2. Write a procedure called HexInput that loads the register EAX with

the numerical value of the hexadecimal string entered at the keyboard. See the

algorithm’s pseudocode in Slide-52 of Chap_06 (Lecture-9). A full solution for

the binary case (BinInput) also appears in Slide-50 of Lecture-9 (I have

explained and traced this solution in classroom).

For example: EAX is loaded with 1111 1110 0000 0001 1100 1000 0011 0111,

when the procedure HexInput reads the hexadecimal string “FE01C837h”;

note: make sure that character ‘h’ is the last character read from keyboard.

3. To test these two procedures above, your main program should first

ask you “What do you want to do, Lovely?”.

1. If you type the letter W (or w) then the main program reads an unsigned

32- bit decimal number from the keyboard, and loads the number into

EBX, and then calls the procedure HexOutput (which displays a

hexadecimal string).

2. If you type the letter R (or r) then the main program calls the procedure

HexInput (which reads a string from the keyboard, then loads it into

EAX), and then displays the binary content of register EAX.

It exits with the message “Get Lost, you Sweetey Honey Bun” when you type anything

else . In 3.1 and 3.2, above, the main program exits with “Thank you, Sweetey Honey

Bun”

Kĩ năng: x86/x64 Assembler, Lắp ráp, Lập trình C, Lập trình C++, Kiến trúc phần mềm

Xem nhiều hơn: projects assembly language programing, free assembly language lectures, freelance assembly language programmer, programming frequency assembly language, assembly language programming jobs, easy simple projects assembly language, lahore assembly language, eclipse assembly language, alpha assembly language, assembly language programs, assembly language matrix, pwm assembly language code, assembly language generator, assembly language program average numbers, mips assembly language programming forum, assembly language programmer charge, eclipse assembly language support, time assembly language generator, 2 what is the 68000 assembly language

Về Bên Thuê:
( 0 nhận xét ) Amhertsburg, Canada

ID dự án: #28189854

2 freelancer chào giá trung bình$48 cho công việc này

SUog

Hello, I can write the code you requested. THank you

$60 CAD trong 2 ngày
(164 Nhận xét)
6.3
noblekafdav

I have read your details about the project and that suits me a lot, l have earned certificate in c, programming , Assembly language and many more... I look forward to working with you ...

$35 CAD trong 4 ngày
(0 Nhận xét)
0.0