1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
VMariaS [17]
4 years ago
10

Write a program that turns a 32-bit numeric value (e.g., 0xFFFFh) and converts it to a byte array such that it can be printed to

the screen using a system call method. A loop is necessary for converting the numeric value to ASCII for output. Again, use a system call (e.g., int 80h) to print the value to the console (see "Course Material" -> Examples). Calling external functions (e.g. printf) is not allowed.
Computers and Technology
1 answer:
Evgesh-ka [11]4 years ago
3 0

Answer:

The program is written below,

.386

.MODEL FLAT, stdcall

.STACK 4096

GetStdHandle PROTO, nStdHandle:DWORD

WriteConsoleA PROTO,

hConsoleOutput:DWORD, ; output handle

lpBuffer:PTR BYTE, ; pointer to buffer

nNumberOfCharsToWrite:DWORD, ; size of buffer

lpNumberOfCharsWritten:PTR DWORD, ; num bytes written

lpReserved:DWORD ; not used (NULL)

ExitProcess PROTO, dwExitCode:DWORD

.data

bytesWritten DWORD 0 ; for WriteConsoleA

stdHandle DWORD 0 ; for WriteConsoleA

s1 BYTE "Hello Universe", 13, 10, 0

lenS1 = ($ - s1)

.code

_main PROC

print:

; get STDOUT handle

push -11 ; request STD_OUTPUT_HANDLE (-11)

call GetStdHandle ; call WinAPI to get console handle

mov stdHandle, eax ; save stdHandle

push 0 ; reserved, push NULL

push OFFSET bytesWritten ; bytes written

mov eax, lenS1

push eax ; bytes to write

push OFFSET s1 ; string address

push stdHandle ; STD_OUPUT_HANDLE

call WriteConsoleA ; call win api to write text to console

done:

INVOKE ExitProcess, 0

_main ENDP

END

You might be interested in
Which resources could be used a lot when installing a desktop app for synchronization purposes? Choose two answers.
Sergeu [11.5K]

Answer:

While installing desktop sync app such as drop box following two resources will be used a lot

  1. CPU
  2. RAM

Explanation:

CPU usage has been increased while installing desktop sync application, because it depends on the number of files that need to be synced. If the number of files is high the CPU usage will increase.

The need of memory such as RAM is also increased while installing the desktop sync application. As the number of files that need to be synced increases the RAM usage is also increases.

4 0
3 years ago
Which of the following best describes Vivofit’s purpose?
Daniel [21]
The vivofit by Garmin is a fitness tracker that not only tracks distance, calories burned, and steps — it lasts on one charge for an entire year. Slap it on your wrist and never worry about charging it.
5 0
3 years ago
The ______ identifies the path for the currently open folder
skelet666 [1.2K]

The answer to this question is called Directory Paths. Directory Paths because most of the time they include one or more paths to the folder.

8 0
4 years ago
Read 2 more answers
The top element in the hierarchy is the html element , which contains all of the other elements within a Hypertext Markup Langua
Anna [14]

the answer is true

The top element in the hierarchy is the html element

6 0
4 years ago
3 Which of the following statements are true about how technology has changed work? Select 3 options. With the spread of technol
madam [21]

Answer:

In a gig economy, workers are only hired when they are needed for as long as they are needed.

Businesses can be more profitable by using communication technology to reduce the costs of travel.  

Through the use of the Internet and collaboration tools, more workers are able to perform their jobs remotely.

Explanation:

7 0
3 years ago
Other questions:
  • For film editors, which task comes last in their workflow pattern?
    12·2 answers
  • Which of the following statements is the least abstraction of the World Wide Web?
    15·1 answer
  • Public static Object[] question4(Student student1, Student student2)
    15·1 answer
  • A technician is trying to recover information on a computer that has been hidden or deleted on purpose in order to hide evidence
    5·1 answer
  • You are the IT security administrator for a small corporate network. Due to some recent restructuring, Corey Flynn (flynn) no lo
    11·1 answer
  • Who is Mr.Anonymous?
    5·2 answers
  • Pls help ASAP I’ll brainlest
    6·1 answer
  • Pls help me!! I will give 35 points and mark brainliest !!!
    10·1 answer
  • What is data and information
    9·1 answer
  • List and briefly describe the major types of system in organization?​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!