Question: ASSEMBLY languauge x86 processor Implement a pure assembler program that does USE THE FOLLOWING CODE ; following are options if you want {}.list file ;TITLE
ASSEMBLY languauge x86 processor Implement a pure assembler program that does
USE THE FOLLOWING CODE
; following are options if you want {}.list file ;TITLE enterYourTitleHere ;PAGE 60,132 ; #lines, width .386P ; use 80386 instruction set .MODEL flat ; use flat memory model ; declare external functions that we are using extern _ExitProcess@4:near extern _GetStdHandle@4:near extern _ReadConsoleA@20:near extern _WriteConsoleA@20:near .DATA ; declare initialzed data here obuf db "Hello, world!", 10, 0 .DATA? ; declare uninitialzed data here ohandle dword ? ihandle dword ? bout dword ? bin dword ? ibuf db 80 DUP (?) ibufsize = ($ - ibuf) STD_INPUT_HANDLE EQU -10 STD_OUTPUT_HANDLE EQU -11 .STACK ; use default 1k stack space .CODE ; contains our code ;'main' is the entry point, as defined in MSVS ; Properties->Linker->Advanced->Entrypoint main PROC PUBLIC ; ohandle = GetStdHandle(STD_OUTPUT_HANDLE); push STD_OUTPUT_HANDLE call _GetStdHandle@4 mov ohandle, eax ; WriteConsole(ohandle, obuf, obufLen, &byteswritten, 0); push 0 push OFFSET bout ; bytes written push SIZEOF obuf ; obuf length in bytes push OFFSET obuf ; output buffer push ohandle call _WriteConsoleA@20 ; ihandle = GetStdHandle(STD_INPUT_HANDLE); push STD_INPUT_HANDLE call _GetStdHandle@4 mov ihandle, eax ; ReadConsole(ihandle, ibuf, sizeof(ibuf), &bytesread, 0); push 0 push OFFSET bin ; bytes read push SIZEOF ibuf ; ibuf length in bytes push OFFSET ibuf ; input buffer push ihandle call _ReadConsoleA@20 ; ExitProcess(0); ; normal end with error code 0 == no error push 0 call _ExitProcess@4 main ENDP ;end the "main" procedure END main ;end the entire program around the "main" procedure the following:
1) Defines symbolic constants for all twelve months in a year. Create an array variable that uses the symbols as initializers.
2) Defines a byte array that contains the following string: Toto, I've a feeling we're not in Kansas anymore. 3) Prints out the byte array in #3.
4) Prompts for and reads in a string via ReadConsole and displays the following: {string}, Ive a feeling were not in Kansas anymore.

C:\WINDOWS\system321cmd.exe CA. Toto, I've a feeling we're not in Kansas anymore Please enter string Frodo Frodo, I've a feeling we're not in Kansas anymore. Press any key to continue C:\WINDOWS\system321cmd.exe CA. Toto, I've a feeling we're not in Kansas anymore Please enter string Frodo Frodo, I've a feeling we're not in Kansas anymore. Press any key to continue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
