irvine32

Assembly Language New Line

风流意气都作罢 提交于 2019-12-19 11:31:59
问题 I'm brand new to assembly language programming, and I would like my output to have separate lines so that it is easier to read, however, I wrote my code and had it working, but was then informed that I could not in fact use the Irvine procedure to make a new line. My text book only uses the Irvine "Crlf" and the code from other people who asked similar questions on this website completely broke my program so now I'm lost. One I attempted was: mov ah, 0Eh ;print new line sequence mov al, 0Dh

Assembly Language New Line

一曲冷凌霜 提交于 2019-12-19 11:31:08
问题 I'm brand new to assembly language programming, and I would like my output to have separate lines so that it is easier to read, however, I wrote my code and had it working, but was then informed that I could not in fact use the Irvine procedure to make a new line. My text book only uses the Irvine "Crlf" and the code from other people who asked similar questions on this website completely broke my program so now I'm lost. One I attempted was: mov ah, 0Eh ;print new line sequence mov al, 0Dh

x86 assembly: Irvine32 - Get last element of an array

柔情痞子 提交于 2019-12-13 22:19:06
问题 I'm new to Assembly, I need help with an assignment in Assembly Language Irvine32. I want to know where I'm going wrong. I believe my code is 80% right but there's something I'm not seeing or recognizing. Here's the program details. "Write an assembly language program that has an array of words. The program loads the last element of the array into an appropriately sized register and prints it. (Do not hardcode the index of the last element.)" INCLUDE Irvine32.inc .data val1 word 1,2,3,4,5,6

Writing out a single register in Assembly

强颜欢笑 提交于 2019-12-13 21:07:42
问题 Fairly simple question this time. How do I write to screen the contents of a single register in Assembly? I'm getting a bit tired of calling DumpRegs just to see the value of one register. I'm using x86 architecture, and MASM in Visual Studio, and Irvine32.lib. 回答1: Irvines's DumpReg uses repeatedly a macro of Macros.inc : mShowRegister . It can be used directly. Example: INCLUDE Irvine32.inc INCLUDE Macros.inc .code main PROC mov esi, 0DeadBeefh mShowRegister ESI, ESI exit main ENDP END main

Visual Studio doesn't open a DOS window when I run my Assembly language program with control-F5

只谈情不闲聊 提交于 2019-12-13 08:41:05
问题 I have setup everything. When I click Ctrl + F5 , it does not show anything. I just want it to show my name with a black window. How do I do that? 回答1: Most likely you have the subsystem set to "Windows application", which means the process will start with no console associated. Attempts to write will then fail. You can either associate a console with AttachConsole() and/or AllocConsole() or change the subsystem via linker command line ( /SUBSYSTEM:CONSOLE ). 回答2: Instead of running your

Trying to flip a triangle in assembly language

吃可爱长大的小学妹 提交于 2019-12-13 07:59:17
问题 INCLUDE Irvine32.inc .code main PROC mov ecx, 6 L1: call Proc1 call CRLF loop L1 exit main ENDP proc1 PROC USES ecx mov al, 'A' L2: call WriteChar inc al loop L2 ret proc1 ENDP END main The output of my code is ABCDEF ABCDE ABCD ABC AB A In a triangle form going down but I need to flip it to where it is A AB ABC ABCD ABCDE ABCDEF Edit: Trying to mirror the right triangle. A A AB BA ABC CBA ABCD DCBA ABCDE EDCBA ABCDEF FEDCBA 回答1: As suggested by @Jester, counting up is the solution, but only

Move register value into an array

社会主义新天地 提交于 2019-12-13 06:13:59
问题 I'm working on this assembly problem where I'm looping through each element in array1 and storing the index of that array where the entry is "F". I'm using MASM for x86 intel processors. Assembly Language INCLUDE Irvine32.inc .data array1 BYTE "FMMFMFMMFFMMFFFMFMFM",0 indexa1 BYTE SIZEOF array1 DUP(?) ArraySize = ($ - array1) .code main PROC mov esi,0 ; index mov ecx,ArraySize L1: cmp esi,ecx ; check to continue loop jl L2 ; continue jmp L5 ; exit L2: cmp array1[esi], "F" ; Check if "F" je L3

Random number array sorted with Selection Sort — garbage characters output for size > 130

别说谁变了你拦得住时间么 提交于 2019-12-13 04:45:43
问题 My program takes user input (integer between 10 and 200) and prints out the entered number of random numbers and stores them in an array. Then the array is sorted and printed out (SEE IMAGE BELOW). The median is of the numbers are also printed on the screen. I have not been able to find the error. The program works perfectly for numbers less than or equal to 130, but not over 130. TITLE Program5 (Program5.asm) INCLUDE Irvine32.inc ; (insert constant definitions here) MIN_INPUT = 10 MAX_INPUT

Moving a BYTE to a BYTE

匆匆过客 提交于 2019-12-13 02:16:40
问题 I am in a Machine Architecture and Assembly Language class, and I am supposed to create a MASM program that creates the Fibonacci sequence up to a user defined number, that is inclusively between 1 and 46. When I try to transfer the string stored in a BYTE labeled buffer , which is where the book authors ReadString procedure stores a string, to another BYTE labeled user , I receive this build output: 1>------ Build started: Project: MASM2, Configuration: Debug Win32 ------ 1> Assembling

Assembly write number to file

痞子三分冷 提交于 2019-12-12 03:23:23
问题 I try to write number to file via Assembler Include Irvine32.inc .data fileName DB 'number.txt',0 FileHandle DD ? numberBytes DD ? number DD 101 numberChar DD $-cislo .code WriteToFileP proc ;create file push NULL push FILE_ATTRIBUTE_NORMAL push CREATE_ALWAYS push NULL push 0 push GENERIC_WRITE push offset fileName call CreateFileA mov FileHandle,eax ;write push NULL push offset numberBytes push numberChar push number push FileHandle call WriteFile ; close file push FileHandle call