2,889 Topics

Member Avatar for
Member Avatar for bigwhiteegg

here is part of a C++ function that i'm having difficulty translating [CODE]void rotate(int ls[], int n) { int j; int temp; temp = is[0]; for(j=0; j<n-1; j++) { ls[j]=ls[j+1]; } ls[n-1]=temp; }[/CODE] so far this is what i have [CODE];void rotate(int ls[], int n) j3: .EQUATE 0 temp: .EQUATE …

0
69
Member Avatar for Tellalca

Hey; I have an assignment but I'm having trouble because I don't know almost any assembly. I have figured out something but please help me if I have mistakes, and with the 3rd formula. Using knowledge from previous weeks, write assembly programs which calculate the given formulas: a)Sum (i=1 to …

Member Avatar for Kieran Y5
0
108
Member Avatar for Cragsterboy

okay guys im really stuck on this and i need help badly. All i know is that i need a loop at the begining to ask for four different marks, these marks have to be between 0-100. the marks are then stored in array and then i do a sum …

Member Avatar for Tight_Coder_Ex
0
97
Member Avatar for dem10

Hi all, I think I am on the right path, teaching myself MIPS for my job and I need help adding to an array. I am doing a few different tutorials here and there and right now I am in the middle of doing a tutorial for this code: value …

0
52
Member Avatar for ww33ww

hello, i find this code but i don't know how it works please is there anyone know how to change characters font i need a sample example [CODE] push ds ; pop es ; make sure ES = DS mov bp,offset OurFont ; mov cx,02 ; we'll change just 2 …

0
68
Member Avatar for Cragsterboy

okay guys im really stuck on this and i need help badly. All i know is that i need a loop at the begining to ask for four different marks, these marks have to be between 0-100. the marks are then stored in array and then i do a sum …

Member Avatar for Cragsterboy
0
100
Member Avatar for mansace

I have this code where I have to implement binary search by first using the selection sort algorithm in mips My selection sort works but trying to use the sorted list to execute a binary search is where my problem comes. I get an error saying is out of range. …

0
64
Member Avatar for aanders5

Ok, I have two pieces of code, this is my FIRST time ever trying to do a SPIM coding, so forgive me if this is a total trainwreck. :) [B] I will FIRST post the question, along with pseudo code of what it is suppose to do. THEN I will …

0
85
Member Avatar for dhanh90

I'm learning MIPS structure and starting writing assembly code..and i have problem with multiplication...the thing is in mips we have HI and LO to store the product .when the product is small (32 bit) i can use mflo to print out the result..but mult two big numbers the result will …

0
61
Member Avatar for Jtibs

Hello, I am trying to write a MIPS program that uses a function call to return the index of the smallest character within an array. I have my code set up in a way I thought would be correct, but when I try to test it seems to not even …

0
132
Member Avatar for guthrie

hi i need to make a program in assembly mips that checks if a letter exist in one string any ideas?

Member Avatar for Goalatio
0
122
Member Avatar for amateur¬

Basically, I've written assembly code which allows a text file to be copied from it's current location through the Com cable onto a destination on another computer. This is the code for the transmitter part ONLY. [CODE]#include <stdio.h> #include <conio.h> #define FEND 0x40 int main (void) { char wtmode[]= "wb"; …

Member Avatar for Goalatio
0
213
Member Avatar for magicsign

You can become crazy with this problem. Lets see this other quick solution to compare strings. Remember that strings are a sequence of bytes. home : h(first byte),o(second byte),...,e(last byte),0 a tag to identify the end of the string. Suppose you have a string inside a register : %esi and …

Member Avatar for Goalatio
0
309
Member Avatar for davibq

Hi, im trying to print a "$". I tried using: msj db "Hola", 36 msj db "Hola \$", '$' msj db "Hola \\$", '$' But none of them worked.. Help please

Member Avatar for mathematician
0
165
Member Avatar for SuperTron

Hi there, I am having some problems with an assembly line on my core 2 duo system running mac os x 10.6.4. Basically, I am trying to run this C command using gcc: [CODE] __asm__("movl %0, %%esp" :"=m" (jumpsp)); [/CODE] Where jumpsp is a character pointer. Now, this code fragment …

0
37
Member Avatar for mikesr

Hi! I'm trying to convert C++ code to nasm ..unsuccessful Well, here is the c++ code: [code] int recursion(int n) { if ((n==0) || (n==1)) return 1; else if (n==2) return 7; else return recursion(n-3)+recursion(n-2); } int main () { for (int i=3; i<=15; i++) { cout << recursion(i) << …

Member Avatar for mikesr
0
126
Member Avatar for assemblerage

I'm sure this is the most belabored question here as this comes from a school assignment but I have perused google for far too long. Can someone help me get this code to output? I've tried putting the li, print_int calls in both loops and keep getting weird answers. This …

0
79
Member Avatar for Alerwiali

[CODE] This program suppose to take number of rows and print a triangle of stars like this: How many row for the triangle? = 12 * *** ***** ******* ********* *********** ************* *************** ***************** ******************* ********************* *********************** Please help with no much modification if possible !! ;Assembly Version .model small …

0
65
Member Avatar for lee.j.baxter

Hi everyone, I'm creating my own OS from scratch, and I'm first producing an installation CD so that I can easily install my kernel on a hard drive. So far, I've written a CD-based bootstrap loader in NASM that finds a program within the root directory of the CD, loads …

Member Avatar for lee.j.baxter
0
287
Member Avatar for Goalatio

Over the past few days I have been writing a bootloader/kernel in NASM... It loads perfectly fine when I write it to a virtual floppy using PARTCOPY, and then boot to it from Oracle VM VirtualBox. However, when I write it to a physical floppy and try to boot to …

Member Avatar for Goalatio
0
331
Member Avatar for cherrydeee

hi. can someone give me a link with a tutorial on how to make graphics using the turbo assembly language? graphics like square, circle, lines, etc. thanks

Member Avatar for Goalatio
0
212
Member Avatar for vedel
Member Avatar for Ancient Dragon
0
161
Member Avatar for dhanh90

I have the code here but still can not figure out why it can not work why I enter X=2, and N>= 31.... [CODE].data str: .asciiz " Inter X:" str1: .asciiz " Inter N:" str2: .asciiz " X to the power of N is : " .text main: la $a0,str …

Member Avatar for dhanh90
0
7K
Member Avatar for user543820

i m making a debugger and i want to write a TSR for a debugger so that i can debug any ".asm" file. how should i write it?

Member Avatar for Ancient Dragon
0
56
Member Avatar for extemer

i want to known that i am starting to work on chip programming so i cant understand my first step.The programming language on which i used to work is java and still working.so my question is that how can i program a chip and i don't have any info about …

Member Avatar for lee.j.baxter
0
137
Member Avatar for XodoX

I'm still a beginner, so please bear with me;) I'm supposed to write a code that generates the Fibonacci series. Here is the sample program output: Please enter n (This program generates 0 to Fn) : 5 0 1 1 2 3 5 So, that's what I did.. [CODE] .data …

0
55
Member Avatar for Josue198s

guys i need a assembly x86 compiler..in windows i use MASM615..i dont want to code on windows.i do all my coding in java and C..on linux pleas some help for asm compile on ubuntu 10.10 .

Member Avatar for GuitarComet
0
133
Member Avatar for natostanco

Hello, the exercise says to define a group of locations to define months using a standard number of bytes, and to use 8 bit unsigned to set the number of days for each month... i wrote this DB 'GEN',31D DB 'FEB',28D DB 'MAR',31D DB 'APR',30D DB 'MAG',31D DB 'GIU',30D DB …

Member Avatar for natostanco
0
104
Member Avatar for Federer

Hello I am Beginner in Assembly. I Want write this program to Assembly: int x,y,z,w; w=x*y/z+14; Help me. Thank you.

Member Avatar for low_coder
0
62
Member Avatar for Lightslei

My task was to create a program that would copy a file. Ok, didn't look too hard using the textbook and class notes, heavily borrowing from the textbook. However these 2 errors have me stumped. invalid instruction operands segment, group, or register expected. The first one refers to this: mov …

Member Avatar for low_coder
0
86
Member Avatar for Joey_Brown

Hello I hava a question regarding assembly. How could I take a number from register and find out how many hundreds, tens and ones it has. For example a number 412 has 4 hundreds 1 dozens i 2ones. Ive tried with looping a sub with a BRMI branch, but the …

Member Avatar for low_coder
0
113
Member Avatar for vedel

I have a asm boot on a floppy disc and i want to show a c++ kernel (cuz c++ are easy). but how can i link it? I heared somethig about : extern _main call _main for asm. Can anyone help me? :'(

Member Avatar for vedel
0
227
Member Avatar for link00seven

Hi all, I have been asked for a homework assignment to write, in Motorola 68K Assembly, an algorithm to sort an array and place the sorted array into another array. I have absolutely no idea how to do this...I have been working on it but i'm having a hard time …

0
292
Member Avatar for vedel

Hey Guys! I am vedel and this is my first Thread in this Community. My question is, how i can boot a c++ code? example code: [CODE] #include <iostream> using namespace std; int main() { cout << "Hello World!" << endl; return 0; } [/CODE]

Member Avatar for vedel
0
1K
Member Avatar for Alerwiali

what is wrong with this [CODE];Author : Alerwi Ali ;Function : Sort an array of 10 elemnts(Bubble sort) .model small .stack size equ 10 .data vett db 1,4,3,2,4,-1,-4,0,6,10 temp db ? i db 0 j db 1 .code .startup mov ax,@data mov dx,ax xor si,si xor cx,cx mov cx,size lea …

Member Avatar for Ancient Dragon
0
129
Member Avatar for brando|away

im using fasm (flat assembler 1.68), and im trying to output a string with int21h/ah=09h [code] jmp main msg db "hello world$" main: mov dx, msg mov ah, 09 int 21h [/code] this code outputs "hello world", but it outputs some control characters before it ([SOME WEIRD CONTROL CHARACTERS]hello world) …

Member Avatar for davibq
0
3K
Member Avatar for Alerwiali

Could some one here tell me how to resolve the problem it says duplicate DecimalToString Dos that mean i cant use a macro twice in the same program if yes how to print more than one number Thanks in advance [CODE];Author :Alerwi Ali ; function: Calculate the sum of ; …

Member Avatar for Alerwiali
0
290
Member Avatar for Psyenyde

Hey everyone, my first post here, so lets see if I do this right. So I have this assignment that links a fibonacci.c, fib.h, and fib.s file. The assignment is supposed to be done by compiling all of the files, then running ./fibonacci <n> where <n> is the n'th term …

Member Avatar for Psyenyde
0
519
Member Avatar for bloody_ninja

My project is to take an input file and reverse the text, but first I want to concentrate on just plain reversing a string. This program has no errors, but it doesn't display the reverse string [CODE]INCLUDE Irvine32.inc .data source BYTE "This is the source string",0 target BYTE SIZEOF source …

Member Avatar for Kruor
0
78
Member Avatar for jwill222

Problem that ask to write an application that fills an array with 50 random integers,loop through the array,displaying each value, and count the number of negative values;after the loop finishes display the count. Note: The Random32 procedure from the Irvine32 library generates random integers. *I honestly don't know where to …

Member Avatar for jwill222
0
1K
Member Avatar for J.Killa

Hi...I'm having a little problem doing a program in the LC-3. I have to do a program in which I declare a string and then print it backwards. The other part of the program then wants me to count the number of times each letter repeats itself in the string. …

0
65
Member Avatar for bloody_ninja

Does anyone know how to create ASM code in VS2008? I am so confused and cannot find the method in which I can code in Visual Studio.

Member Avatar for bloody_ninja
0
102
Member Avatar for sidra 100

what r sum applications of very common microprocessors and microcontrollers that uses assembly language as its basic or core language

Member Avatar for coolshiva
0
74
Member Avatar for moonL!ght

i have to submit my assignment after 4 hours and there are fue things i couldnt understand i wich any can help me to understand.... Given DS = 1234H and the declarations: DATA SEGMENT VAR1 DB β€˜CAT’, 3 DUP(?), 0, β€˜0’, ? VAR2 DD 123ABC4DH DATA ENDS and [COLOR="red"]LEA BX, …

Member Avatar for Ancient Dragon
0
84
Member Avatar for gujuplayer

I am not understanding how to convert a 2d array from c to Mips assembly. Like if you had int array[5][2]={{1,1},{2,2},{3,3},{4,4},{5,5}} how would you convert that to Mips assembly and access it like x=array[i][0] & y=array[i][0]?

0
90
Member Avatar for Yeen

First of all, yes this is homework. Secondly, I'm pretty much stuck :-/ As an example, say I have a word: 0000 0000 0000 0000 0000 0000 001[COLOR="Red"]0 0011[/COLOR] ; 35 I want to convert it into IEEE 754 using MIPS: 0100 0010 0[COLOR="Red"]000 11[/COLOR]00 0000 0000 0000 0000 ; …

0
85
Member Avatar for ahmetT

Hello, I'm just working on a fibonacci numbers in 8086 assembly. However it is not working as I expected. All I want count from 0 to 100. If anyone knows, please help me, thanks. Here the code I have done so far: [CODE] org 100h mov al,0 mov bl,0 mov …

0
95
Member Avatar for titan_550

Is it possible to be unable to put two "physical addresses" with a distance of less than 256k in a segment? My assembly professor asked me this. Is this the right answer:"it depends on how you set the align type(BYTE,WORD,PARA,PAGE), if you set it to BYTE the answer is NO …

Member Avatar for titan_550
0
123
Member Avatar for Afupi

This is just an example to show what I am attempting to do. It's just a small portion of a larger project I have nearly completed, but am now trying to tie the existing procedures together. I want to pass the value of the variable proc1_var from procedure1 onto the …

0
72
Member Avatar for dinhtandl

Dear all, I use MASM611 to compile code assemply. Please hepl me to implement functions to read IO or Memory. I have a Base Address (example: 0xE1004000), i want to read IO or Memory at this address. And is that address a IO Addrress or Memory Address in DOS? And …

0
49

The End.