irvine32

Assembly - Round floating point number to .001 precision toward -∞

核能气质少年 提交于 2020-12-10 06:30:28
问题 I am trying to write all my floating point numbers to .001 precision toward -∞. I have set the RC field to 01 binary, but I am only able to print out the initial floating point number with the wanted precision and thereafter it disregards the rounding. I think I might be missing something obvious in how I am handling the precision towards -∞, but I am not sure. INCLUDE Irvine32.inc .data ctrlWord WORD 010000000000b ; set the RC field to round down toward -∞. .code fild sum ; load integer into

MASM string reversal

不想你离开。 提交于 2020-07-09 11:31:08
问题 Alright, Im going about this, with what is probably a really complicated solution, but its the first thing that popped into my head. I need to write an assembly language program that reverses a "source" string, without using a "target" string ( a temp variable ) .. this is my attempt at it. INCLUDE Irvine32.inc .data source BYTE "This is the source string", 0 count DWORD ? .code main PROC mov ecx, LENGTHOF source L1: mov count, ecx ; save our outer loop count mov al,[source+0] ; get the first

MASM string reversal

你说的曾经没有我的故事 提交于 2020-07-09 11:29:54
问题 Alright, Im going about this, with what is probably a really complicated solution, but its the first thing that popped into my head. I need to write an assembly language program that reverses a "source" string, without using a "target" string ( a temp variable ) .. this is my attempt at it. INCLUDE Irvine32.inc .data source BYTE "This is the source string", 0 count DWORD ? .code main PROC mov ecx, LENGTHOF source L1: mov count, ecx ; save our outer loop count mov al,[source+0] ; get the first

MASM string reversal

懵懂的女人 提交于 2020-07-09 11:27:26
问题 Alright, Im going about this, with what is probably a really complicated solution, but its the first thing that popped into my head. I need to write an assembly language program that reverses a "source" string, without using a "target" string ( a temp variable ) .. this is my attempt at it. INCLUDE Irvine32.inc .data source BYTE "This is the source string", 0 count DWORD ? .code main PROC mov ecx, LENGTHOF source L1: mov count, ecx ; save our outer loop count mov al,[source+0] ; get the first

What is the Irvine32 library and why do we use it?

老子叫甜甜 提交于 2020-01-21 15:54:12
问题 I want to know that the Irvine32 assembly language library is. I want a definition and also why we use this library. 回答1: I want to know that what is Irvine32 library in assembly language. Irvine32 library is collection of helpful functions, you may check online documentation for list of them and further details. I want a defenation and also why we use this library? I don't know why you use it. Usually one wants to use it to avoid writing the code providing that functionality himself. As the

Need help to display number with decimal places in assembly language using visual studio .asm file

百般思念 提交于 2020-01-15 09:34:07
问题 Need help to display number with decimal places in assembly language using visual studio .asm file. For instance, 10 divide 4 will be 2.5 but it only displays 2 mov eax, 10 mov ebx, 4 xor edx, edx div ebx call WriteDec 回答1: DIV offers as result both the integer quotient and the remainder. From the remainder you can construct an integer number after the decimal point by multiplying it by 10 and dividing it by the divisor: INCLUDE Irvine32.inc .CODE main PROC mov eax, 10 ; Dividend mov ebx, 4 ;

Print figure of hangman in assembly

我们两清 提交于 2020-01-07 06:17:05
问题 Is there a better way to print a hangman figure? FIG0 DB 0DH,0AH,' +=======+',0DH,0AH,' |',0DH,0AH,' |',0DH,0AH,' |',0DH,0AH,' |',0DH,0AH,' |',0DH,0AH,' |',0DH,0AH,' ========+',0DH,0AH,'$' FIG1 DB 0DH,0AH,' +=======+',0DH,0AH,' | |',0DH,0AH,' O |',0DH,0AH,' |',0DH,0AH,' |',0DH,0AH,' |',0DH,0AH,' |',0DH,0AH,' ========+',0DH,0AH,'$' FIG2 DB 0DH,0AH,' +=======+',0DH,0AH,' | |',0DH,0AH,' O |',0DH,0AH,'/ |',0DH,0AH,' |',0DH,0AH,' |',0DH,0AH,' |',0DH,0AH,' ========+',0DH,0AH,'$' FIG3 DB 0DH,0AH,' +

Where can the code be more efficient for checking if an input character is a vowel?

南笙酒味 提交于 2020-01-04 04:20:25
问题 This Assembly project reads the key presses and output them in a specific color. When a vowel is pressed it changes the color of the text until another vowel is pressed and does so until the ESC key is pressed. The colors are in a certain pattern which is why I SUB 8 when it reaches the end of the cycle. I am just looking to make it more efficient. I tried making all the compare statements into one line but wasn't successful. INCLUDE Macros.inc INCLUDE Irvine32.inc INCLUDELIB Irvine32.lib

How to reverse and print a string in assembly language

懵懂的女人 提交于 2020-01-03 04:47:05
问题 So my assignment was to write a program in assembly code that could make a statement, recieve a user inputted string. Print that string then reverse it using the cpu stack and print it again. this is what I have thus far. INCLUDE Irvine32.inc .data buffer byte 20 DUP(0) byteCount DWORD ? Question byte "Please enter your name." ,0 Greeting byte "Hello " ,0 Statement byte " Here is your name backwards" .code main proc mov edx , OFFSET Question call WriteString call CRLF Call CRLF mov edx,

How do I remove everything after a certain character in a string?

烂漫一生 提交于 2020-01-03 03:28:14
问题 How do I remove everything in the string after the '?' ? The code I have so far searches for the '?'. How do I proceed from there? This is my code. INCLUDE Irvine32.inc .data source BYTE "Is this a string? Enter y for yes, and n for no",0 .code main PROC mov edi, OFFSET source mov al, '?' ; search for ? mov ecx, LENGTHOF source cld repne scasb ; repeat while not equal jnz quit dec edi ; edi points to ? end main 回答1: You can replace everything after the "?" by zeroes, so all the characters