3,896 Topics
![]() | |
We are currently using assembly language in one of my classes. I have to write a loop that adds up numbers and takes the sum, however at the end of the loop (when a user types in a negative number) it is supposed to start over... My problem is I … | |
Hi, how is this done in assembly? [CODE=c++] ofstream writer("settings.ini"); writer << "launch: 1" ifstream reader("settings.ini") char buffer[MAX_PATH]; reader.getline(buffer, MAX_PATH); HANDLE hFile = CreateFileA(StubPath,GENERIC_WRITE,0,0,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0); memset(&overL, 0, sizeof(overL)); overL.Offset = 0xffffffff; //end of file overL.OffsetHigh = -1; WriteFile(hFile, Settings, strlen(Settings), &dwBytesWritten, &overL); CloseHandle(hFile);[/CODE] How would I split a string in assembly? … | |
The aim of the program was to Write a short assembly language program which creates a divide by zero trap and modify the isr so that you change the error message that the isr issues. stepintr.asm << the sample isr << built in system trap message he said. stepintr.asm contains … | |
Im writing a project in mips, and i load a bunch of inputs into memory. when i read them back out there in the same order except for the zero which ALWAYS get moved to the end of the array. I literally load the values straight into memory after reading … | |
This procedure dispatches application defined event handlers and alternately executes default process for both standard or sub/super classed windows. Map is defined as follows. In most cases I define this table in .data, but in can be in .const also. I choose writeable memory as application can redefine characteristics. [code] … | |
Hi Guys, I need to hand in a project tomorrow morning and its almost 6pm here so I need help as soon as possible. I am trying to get the picture images from the Resource folder because I imported them to the Resource folder but cannot seem to retrieve them. … | |
I'm supposed to get a 4-digit number from the user, convert it to binary (and hex), then print it out. I have absolutely no idea where to start. I know the algorithm; taking the number, diving it by 2, repeat until the number reaches 0 and the remainders of everything … | |
I have been searching and can't quite find how to call a C++ library function from masm. I would like to be able to call printf and system. Can anyone point me in the right direction? Thanks | |
I need to parse an assembly program. I have no problems parsing a group of instructions or a group of instructions with one loop. For example: [CODE] LD R2, 0(R1) DADD R4, R2, R3 SD 0(R1), R4 DADDI R1, R1, #-8 DADD R2, R2, R4 or Loop: LD R2, 0(R1) … | |
Hi, I hope I'll get the answer here. Please tell me why do we divide by 32, when using the timer for serial communication to calculate the baud rate? Thanks, | |
please help me iam new in programming and had just joined it so how can i begib? i need to be professional in it< thanx | |
Hi, I am Dan, I have grown up programming since I was very young, starting with old 8-bit computers in the 80's and working my way up through the years. Although I am not a programmer by trade, I do tend to find ways to fit programming into my tasks … | |
Hey guys. I am trying to print different messages in dependency of what char you press. In my case i use, F1,F2,F3, escape. The problem is that the first message is printed again after a char input is read, which it shouldn't! This is my code, please tell me where … | |
Hey all, i'm really confused what the heck is going on my program. It is a simple program that loops through an array of ints and finds the minimum. Here's the snippet of the code: [CODE]loopBody: mov bh, [edx][esi] ;Assigns element to bh to compare. cmp bh, bl ; loops … | |
Hey everyone, For my project, I need to write an assembly code to detect multiprocessors. I really have no idea how as I have barely done assembly coding and I have no good reference or even idea how to start. Again, what I am going to do is, I'm trying … | |
I am writing a program to calculate how many times the hex decimal number 1ED used between memory locations 0400H and 07FFH and store the result in A ( for 8085) so my solution is : [B]MVI C,00H LXI H,0400H LXI B,03FFH MVI A,1EDH LOOP :CMP M INX H JNZ … | |
[i]Taking the "fright" out of Opcodes and Hex-numbers.[/i] High Level Assembly (HLA) is a modern [b]assembler[/b] + [b]standard library[/b] package that allows a programmer to ease his way toward ASM coding by leveraging concepts already learned from typical high-level languages. By using HLA, one can investigate and play with a … | |
Can anyone tell me what the assembly type for bottom assembly program? #DEFINE PAGE0 BCF $03,5 #DEFINE PAGE1 BSF $03,5 INDF: .EQU $00 ;page 0, 1, 2, 3 TMR0: .EQU $01 ;page 0, 2 OPTION: .EQU $01 ;page 1, 3 PCL: .EQU $02 ;page 0, 1, 2, 3 STATUS: .EQU … | |
Hi, I am just finishing up a semester at Uni that touched on Assembly with the LC-3 (Limited to around 16 instructions). I would like to look more into assembly. Specifically getting a better grasp on assembly opcodes (their purpose), and how they map to HL processes. As opcodes like … | |
When I do this: [CODE]la $a1, 9($t1)[/CODE] the code works, but when I do this: [CODE]marker: .word 9 la $a1, marker($t1)[/CODE] The code doesn't work.... I don't understand why....? | |
This is a program I wrote for class, and its completely done and compiles with no errors, but I keep getting a segmentation fault and even after using GDB and putting print lines (with fflush attached) I cannot figure out what the problem is. I do however think I found … | |
hi , i am doing a project in C#, windows application. i am using sockets for communication between systems. now i am facing an error... its given below.. pls help me to solve this [code]System.Net.Sockets.SocketException was unhandled Message="Only one usage of each socket address (protocol/network address/port) is normally permitted" Source="System" … | |
Hey guys, I am on the Windows OS using NASM16, and I'd like to know how to set the system time.. Code so far: [CODE][org 0100h] ;COM format %include "Lib_1\Lib1.asm" ;settime Hour minute second date month year ;settime "6" "35" "00" "06" "01" "09" ;-------------------- ;Lib1.asm ;string - Displays a … | |
Hi! First of all, I'm new to this, so I apologise in advance if this is a really simple thing... I am trying to write a code in assembly MIPS, in wich the program asks the user for the name of a file where it will read the text on … | |
I am trying to do this: z=(5*a-b/7)/(3/b+a*a) in assembly code and I keep getting some errors. Here is the code & the errs. [CODE] assume cs:code,ds:data data segment a dw 5 b dw 6 z dw 10 intermed dw ? rez db ? data ends code segment start: mov ax,data … | |
This is an example program that I am studying so that i can make my own mixed mode assembly/C program. I am having trouble understanding on the assembly code, why I have to push SI twice at different times and only pop it out once. Also why push and pop … | |
I am having a hard time getting my program to execute correctly. it is supposed to take two numbers entered by the user store them in an array, and reverse the array so when added they display correctly. i am to get the numbers using a procedure two seperate times, … | |
[QUOTE] ; Source name : EAT.ASM ; Executable name : EAT.COM ; Code model: : Real mode flat model ; Version : 1.0 ; Created date : 6/4/1999 ; Last update : 9/10/1999 ; Author : Jeff Duntemann ; Description : A simple example of a DOS .COM file programmed … | |
; this code gereates maximum factorial of 8 decimal ; since, A is a 16-bit register and can hold max value of ;65535 dec (255h). ; MOV A,#8d ; value for the factorial (1-8max) MOV B,A ; B=A MOV C,#1d ; C=1 here: ; LOOP SUB B,C ; B-1 MUL … | |
![]() | Hii all, This is Abdullah from Turkey. I study electrical and electronics engineering. I can use C,C++,and C#, my favorite is C#. And I know a bit ASP.NET. Besides, I am interested in robotics, pic programming. I know Pic Basic and Pic Assembly, I love to use Pic Assembly more. … |
Hi, I have an assignment where i have to write a C and assembly mixed-mode program. [LIST=1] [*]The c program takes in two characters which stand for two hex characters. [*]The assembly procedure then passes each character in turn to a C function which determines if the character is a … | |
Hi, I was using C++ to try to write objects to the screen, and decided to try this in a lower level language. I have searched the web and found some sample code: [CODE] name "vga" ; this program draws a tiny rectangle in vga mode. org 100h jmp code … | |
I'm trying to advance my understanding of how computers and compilers work. Given the C++ program bellow with exceptions and runtime typing turned off and no optimizing that removes main or makes it into a non-standard function. [code=c]int main() {return0;}[/code] Produced an disassembly with the following code for main: [code=asm]pushl … | |
To be upfront and all, this is indeed a homework assignment. But I'm not looking for anyone to write the code I need just help me with a few functions I'm needing to use (the book is VERY vague on how to use these instructions). Assignment is open an encrypted … | |
I am looking to use a string to call a variable in assembly I have the following: [code] msg_0 db "Random phrase",10,0 msg_1 db "Another Random Phrase",10 ...(more messages) msg_11 db "Final Random Message",10,0 msgIndex db "msg_%d",0 [/code] then have the program push msgIndex and a random number to print … | |
[CODE] MOV AH,DAY DIV DIVISOR CMP Al,'0' JE WEEK_ JMP NOT_WEEK_ [/CODE] that is my code that tries to find out if the "DAY" is divisible by "7", which is the DIVISOR.. i initialized them as.. [CODE] DAY DB 1 DIVISOR DB 7 [/CODE] when the "day" is divisible by … | |
Hey everyone, For my project, I need to write an assembly/C code to detect multiprocessors. I really have no idea how as I have barely done assembly coding and I have no good reference or even idea how to start. Again, what I am going to do is, I'm trying … | |
Hey everyone, For my project, I need to write an assembly/C code to detect multiprocessors. I really have no idea how as I have barely done assembly coding and I have no good reference or even idea how to start. Again, what I am going to do is, I'm trying … | |
How to produce an assembly file (.asm) on Windows by having a program in C? I use NetBeans 6.7.1 on Windows and it would help me a lot if i could do that, additionaly do you know a way that the syntax produced will be compatible with MASM? I have … | |
I have an array [icode]a: .word 0:1000[/icode] and I don't understand how I can store/read values from it. For example if I do [icode]sw $v0, a($s1)[/icode] where $s1 is 0 it goes through fine but when I increment $s1 to supposedly access the next space in the array it gives … | |
hello people. I am doing an "os" (small) that's mainly a menu. It just prints some strings and highlights some words when you pres 1,2 or 3. And by pressing enter while a option is selected, it has to do something. The problem is that the program gets stuck in … | |
Hello everyone, I'm trying to create a program that will accept a string and output how many characters are in that string. The input can be a mixture of upper/lowercase letters, digits, spaces, and other cases such as .%^& etc. This is my first time use any type of assembly … | |
Hey all, I've been trying to get my int 10h to set the color for a STRING, not just a single character. Here's my code, i'm running windows XP and using NASM16 assembler. So, what I want it to do is display something like "Hello world", instead of just.. "a", … | |
Hi I need help on how to use LDR and ADC0804 in 8051 microcontroller. So far I have this in my project but I want to replace the switch with LDR (dark activated). What happens here (attached file)is that I use the switch to decrement/increment the number of cars and … | |
Write a program in Assembly Language to find the maximum number and the minimum number from an array of ten positive numbers. Store the minimum number in AX and maximum number in DX. [Hint: Use the conditional jumps] PLEASE HELP ME! | |
I'd like to select a week and pull data based on that week. Data selection starts on line 616. Thanks. [CODE]<%@ Page Language="VB" AutoEventWireup="false" Debug="True" %> <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Weekly Reprints</title> … | |
So, I was trying to re-create the CMD command "set /p", where it prompts the user to type text, and is ended by a carriage return. Upon trying this, however, I found that a word (dw) will only hold the last thing passed to it. You can type "abcdefg", but … | |
I am trying to create an active TSR which prints an 'A' when the ESC key is pressed, it doesn't work. Can anyone tell me what's wrong? [code] bits 16 org 100h jmp init.tsr int1c: push ds push ax push cs pop ds call checkdos2 jc int1c_e cmp byte [hotkey_found], … | |
Ok I'm converting a program from Java to C# and currently stuck on a certain aspect of it. Ok I have; [code=Java]private Graphics g1; private Bitmap picture; picture = new Bitmap(x1, y1); g1 = Graphics.FromImage(picture); pbMand.Image = picture;[/code] pbMand is the name of my picture box, which I will use … | |
I'm a first time hoster, so I apologize for the novice question. When I'm working on my local computer, everything is fine, but I'm just having a problem on the hosting server. I use FileZilla to edit my website. When I edit the main page (.aspx), the system automatically recompiles … |
The End.