irvine32

How to remove all punctuation and spaces in a string?

二次信任 提交于 2021-02-13 16:35:14
问题 I have input like this: This is, ,,, *&% a ::; demo + String. +Need to**@!/// format:::::!!! this.` Output Required: ThisisademoStringNeedtoformatthis I have to do this without using str_trim. Edit: I am writing an encryption program. I have to remove all punctuation from the string and turn all lower case letters to uppercase before I encrypt it. I added the code. I need to remove the spaces, or any punctuation before I turn it to upper case. So far I haven't found anything in my book that

Non-recursive Fibonacci Sequence in Assembly

梦想与她 提交于 2021-02-11 15:45:04
问题 In some homework, I have to create a Fibonacci Sequence program in Assembly. I created this code, but it doesn't seem to be working correctly and I am not sure as to why. I believe that I am doing this correctly, but EAX remains "2" every loop. INCLUDE Irvine32.inc .data prev DWORD ? next DWORD ? val DWORD ? count DWORD ? total DWORD ? myMsg BYTE "Fibonacci Sequence ",0dh,0ah,0 .code main PROC mov ecx,15 mov val,1 mov prev,-1 mov eax,1 mov edx,OFFSET myMsg call WriteString L1: mov count,ecx

Location and Highest value in array

做~自己de王妃 提交于 2021-02-10 12:18:41
问题 So i am trying learn assembly and my practice sheet has an example where i have to create a program to input 10 numbers one at a time into an array. I have to print the highest value and when it was entered. I have barely any exp in comparing but I want to somehow store the high value and compare it the locations? code: include irvine32.inc .data num dw 10 dup(0) count db 1 prompt db "Enter a number: ",0 yesMsg db "hi val is in location ",0 hiMsg db "The high value is ",0 .code main proc mov

Location and Highest value in array

╄→гoц情女王★ 提交于 2021-02-10 12:18:25
问题 So i am trying learn assembly and my practice sheet has an example where i have to create a program to input 10 numbers one at a time into an array. I have to print the highest value and when it was entered. I have barely any exp in comparing but I want to somehow store the high value and compare it the locations? code: include irvine32.inc .data num dw 10 dup(0) count db 1 prompt db "Enter a number: ",0 yesMsg db "hi val is in location ",0 hiMsg db "The high value is ",0 .code main proc mov

Location and Highest value in array

自古美人都是妖i 提交于 2021-02-10 12:18:07
问题 So i am trying learn assembly and my practice sheet has an example where i have to create a program to input 10 numbers one at a time into an array. I have to print the highest value and when it was entered. I have barely any exp in comparing but I want to somehow store the high value and compare it the locations? code: include irvine32.inc .data num dw 10 dup(0) count db 1 prompt db "Enter a number: ",0 yesMsg db "hi val is in location ",0 hiMsg db "The high value is ",0 .code main proc mov

OFFSET Operator in Assembly language for x86 Processors

ⅰ亾dé卋堺 提交于 2021-02-08 09:18:24
问题 I am rather confused by the concept OFFSET Operator. According to Kip R. Irvine's book Assembly Language for x86 Processors, he defines the Offset Operator as the operator that returns the distance of a variable from the beginning of its enclosing segment. He also says the Offset Operator returns the offset of a data label and that represents the distance (in bytes) of the label from the beginning of the data segment. What is the offset? What does he mean by the distance of the label from the

How to display floating-point rounded to .001 with Irvine32 WriteFloat, not printf

非 Y 不嫁゛ 提交于 2021-02-04 08:30:47
问题 I am very new to assembly language so bear with me... I have a floating-point that I have rounded to the nearest .001, but still displays as something like +1.6670000E+000. I would like it to display simply as 1.667. Here is my code for dividing and rounding the numbers: fild num_a fidiv num_b fimul thousand frndint fidiv thousand fst a_div_b And here is my code for displaying the float: mov eax, num_a call WriteDec mov edx, OFFSET divide call WriteString mov eax, num_b call WriteDec mov edx,

How to display floating-point rounded to .001 with Irvine32 WriteFloat, not printf

不打扰是莪最后的温柔 提交于 2021-02-04 08:30:06
问题 I am very new to assembly language so bear with me... I have a floating-point that I have rounded to the nearest .001, but still displays as something like +1.6670000E+000. I would like it to display simply as 1.667. Here is my code for dividing and rounding the numbers: fild num_a fidiv num_b fimul thousand frndint fidiv thousand fst a_div_b And here is my code for displaying the float: mov eax, num_a call WriteDec mov edx, OFFSET divide call WriteString mov eax, num_b call WriteDec mov edx,

Assembly - Move with Zero Fill for Different Data Sizes

╄→гoц情女王★ 提交于 2021-01-28 07:36:04
问题 Currently learning assembly language using Masm. This is for an assignment in my class. I must do certain calculations using 32-bit registers (EAX and EBX). I have to handle BYTE, WORD, and DWORD variables. Not really complicated. I do not really understand why am I getting so many errors when assembling the current code: INCLUDE Irvine32.inc .data ; (declare variables) bNum01 BYTE 64 bNum02 BYTE 32 bNum03 BYTE 16 bSum BYTE ? bDiff BYTE ? bResult BYTE ? wNum01 WORD 64 wNum02 WORD 32 wNum03

x86 Assembly Input a set of Integers

非 Y 不嫁゛ 提交于 2021-01-28 06:31:27
问题 The code below asks a user to input integers and the code will spit the same set of integers back to the user. include irvine32.inc .data input dword ? prompt1 byte "Input your numbers: ",0 .code mWriteNum Macro input push ecx push eax mov eax, offset input call writedec pop eax push ecx endM mReadInput MACRO input push ecx push eax mov eax, offset input mov ecx, sizeof input call Readint mov input, eax pop eax pop ecx endM main proc call clrscr mov edx, offset prompt1 call writeString