Hello everyone : ) i'm working on : [quote]Write a program that takes an input sentence from the user and on next line display the number of capitals letters in the sentence. Note: · User is not allowed to enter a sentence with more than 9 Capital letters. [/quote] what i did is : [code] .MODEL SMALL .STACK 100H .DATA MSG1 DB 'PLEASE ENTER YOUR SENTENCE: $' MSG2 DB 0DH,0AH,'THE NUMBER OF CAPITAL LETTERS IN SENTENCE :$' MSG3 DB 0DH,0AH,'You have entered more than 9 capital liter $' .CODE MAIN PROC MOV AX,@DATA ;initialize DS MOV DS,AX ;DISPLAY MSG1 LEA …

Member Avatar
Member Avatar
+0 forum 14

I am having problems with this program. It assembles but will not run. it will not even start - anyone see the error? global _start section .data $STR00000 db "hello world",0 section .bss $u_exitcode resd 1 section .text extern _iwbstrcpy extern _iwb_finish extern _iwbprint _start: push rbp ; set up stack frame, must be alligned %line 1+0 k.iwb %line 2+0 k.iwb mov rax, 0x0a push rax mov rax, 1 push rax mov rax, 0x0d push rax mov rax, 1 push rax mov rax,STR00000 push qword [rax] mov rax, 0 push rax mov rax, 3 push rax call _iwbprint add rsp,28 …

Member Avatar
Member Avatar
+0 forum 5

I have written a bootloader in ASM (I can post code if you like) and I plan to write a kernel in C /c++ because I don't want to have to deal with a Kernel written ENTIRELY in ASM. Is there any way (Got to keep this under or at 512 bytes) to allow the bootloader, written in ASM, to pass control (like call a method or something) to the C kernel? I'm a newbie to this kind of thing, and I thought I would ask the pros. Please be nice, this is my first post! :icon_cheesygrin:

Member Avatar
Member Avatar
+0 forum 9

hi can anyone here help me to fine solution to the following question in MIPs assemble language 1. Write a program that asks the user to input a set of floating-point values. When the user enters a value that is not a number, give the user a second chance to enter the value. After two chances, quit reading input. Add all correctly specified values and print the sum when the user is done entering data. Use exception handling to detect improper inputs. 2. Repeat Exercise P11.14, but give the user as many chances as necessary to enter a correct value. …

Member Avatar
Member Avatar
+0 forum 1

Write a Marie subroutine that take a range of numbers and prints the prime numbers of this range.

Member Avatar
Member Avatar
-2 forum 1

Hello I want to write a mips program that collects user input, and indicates if the input is all uppercase letters or not. (self.user_2018_2019) submitted just now by user_2018_2019 Write a MIMPS program that collects user input, and indicates if the input is all uppercase letters or not. The program should print “true”, if all the user input is in uppercase letters (A-Z), and it should print “false” otherwise

Member Avatar
Member Avatar
+0 forum 2

I'm trying to convert the following C code to MIPS64 (very new to this): If Im given the addresses: (a @ 100) (b @ 200) (c @ 300) long int a, b, c; // 64-bit ... if (a < b || a == 4) c = 1; else c = 0;

Member Avatar
Member Avatar
+0 forum 5

Hi guys. My task is to write a wombat 1 machine language program in CPUSIM that outputs the radix(only base 2 to 8 inclusive) reperesentation of a number. We have to ask the user for 2 inputs - first is the value to convert(cannot be negative) and second is the radix base. Then do division and note each remainder and display in the correct order. We were also told that not all values will be able to be converted and that we have the choice of how many spaces to set aside for the remainders. I've managed to get a …

Member Avatar
Member Avatar
+0 forum 7

Hi guys, I have a problem. I'm using CPUSim Wombat 1 to write a program. The goal is to display the numbers that the user has entered in the order they've been entered. What I'm stuck on is the storages. It's currently in a loop. The sentinel value is 0. If I create a storage for one number, the contents will be overwritten when the user enters the next number and the previous number will be lost. I've thought of jumping out of the loop and creating permanent storages but the problem is that only one number can be stored. …

Member Avatar
+0 forum 0

The homework is to create a pretty simple calculator, and I think I understand how to do all the calculations well enough, but I'm struggling with a different part of the homework. The user inputs some thing like this: +ooooo which means add 5 to the running total. Or something like this: /ooo which means divide the running total by 3. I don't understand how to go about having my program decide which calculation to perfom. I found the below code on nasm.us, which makes sense, but I don't know how it would translate to seperating user input. %substr mychar …

Member Avatar
Member Avatar
+0 forum 1

I had been writing a program that enforces the loop instruction with indirect addressing but I need it to copy a string from source to target, reversing the character order in the process. I need to use the variables: source BYTE "This is the source string",0 target BYTE SIZEOF source DUP('#') After that I need to insert the following statements right after the loop to display the hexadecimal contents of the target string: [CODE] mov esi, OFFSET target : offset of variable mov ebx, 1 : byte format mov exc, SIZEOF target : counter call DumpMem[/CODE] so far this is …

Member Avatar
Member Avatar
+0 forum 8

can i ask something whats the used of [B].org 100h[/B] in assembly language..., and why it is 100h why can/t it be 60,70,80 or 90h? tnx :)

Member Avatar
Member Avatar
+0 forum 15

I bought a web site a few months ago thinking that I could go to a community tech school. I have not found the classes that I need. So I don't know how to build it. Help?

Member Avatar
Member Avatar
+0 forum 1

Hello there guys! I must implement a linked list in assembly (using MIPS). We're supposed to dynamically allocate memory for the nodes. This is what I am asked to do: Write a program in assembly (MIPS) that implements a link-list. The client can choose among the following options. So the program should include: 1. Insertion. Inserting new nodes at the correct spot keeping the list sorted in ascending order. 2. Deletion. Deleting a node, while still keeping the list in ascending order. 3. Printing in ascending order. Printing each node of the list from the first till the last one. …

Member Avatar
Member Avatar
+0 forum 3

Hello all, i need your help regaring this code, which is in python and i need to convert it into mips?? register $s0 holds the base address of list my_data, $s1 holds the length of the list my_data, register $s2 holds the base address of list my_data2 and $s3 holds the length of the list my_data2. def sum_to_x(x): sum = 0 for i in range (x): sum += i return sum my_data = [1, 3, 6, 7] my_data2 = [2, 1, 5] for i in range( len( my_data ) ): my_data[ i ] = sum_to_x( my_data[ i ] ) for …

Member Avatar
Member Avatar
-1 forum 6

Currently trying to understand how to convert some C into mips. Is a "return func" different from "return"? Both C codes are very similar yet im unsure how they will both look in code once completed. Are both of these codes the same? The second code is from another thread and I wanted to know if anyone could explain to me the differences when converted and why they are similar or different. Here is the C Code: int f (int a, int b, int c, int d) { If (a + b > c + d) return (a + b); …

Member Avatar
Member Avatar
+0 forum 3

Hello, I am supposed to write a code in MIPS to do the following below. Basically, you enter an integer, and it should check to see if it is a palindrome, and if not it will output the number, and keep adding the numer backwards to it, outputting it, and stopping when it is a palindrome. It will output 10 numbers and if the 10th number isnt a palindrome, it stops. I'm having trouble writing this code in MIPS, i was hoping someone could offer up some ideas? My main trouble is the loop in the Palindrome function. I believe …

Member Avatar
Member Avatar
+0 forum 3

Preconditions: Addresses of 2 integer variables are on the stack as the parameters. Sample c call: swap( &num1, &num2); You must implement the following C swap function: /* Swaps the two values pointed to by x_ptr and y_ptr. */ void swap (int *x_ptr, int *y_ptr) { if (x_ptr != y_ptr) { *x_ptr ^= *y_ptr; /* note that ^ means xor */ *y_ptr ^= *x_ptr; *x_ptr ^= *y_ptr; } } Postconditions: The values of the two integer parameters have been exchanged.

Member Avatar
Member Avatar
+0 forum 6

I'm stuck on converting hex or decimal to 16-bit binary,and I don't know how to start. Here is the tasks I need to do: Decimal Conversion Task: Add code that displays the value in R3 to the console as a binary string. It should convert R3 one bit at a time, to ASCII. The displayed format should be exactly of the form: Answer: 0000000000000000 • Your code should be placed in the file where it says “Put your code for part 3 here.” • Your code must start with a label named “PrintResult”. • On entry to your code, R3 …

Member Avatar
Member Avatar
+0 forum 1

AcedCast5 what is This??

Member Avatar
Member Avatar
-2 forum 1

`.model small .stack 100 .data kernel DB 10 DUP(1) input DB 1, 2, 3, 4, 5, 6, 7 output DB 0, 0, 0, 0, 0, 0, 0 .code MAIN PROC FAR MOV AX, @DATA MOV DS, AX LEA BX, input LEA DI, output MOV AX, 0 ;1st element starts here MOV CX, 6 MOV SI, BX CALL SUM MOV BH, 6 DIV BH MOV [DI], AL ;1st element ends here MOV AX, 0 ;2nd, 3rd, 4th and 5th elements start here MOV CX, 7 MOV SI, BX CALL SUM MOV BH, 7 DIV BH MOV [DI+1], AL MOV [DI+2], AL …

Member Avatar
Member Avatar
+0 forum 3

I have an input signal array I have a kernel array of size 10 filled with ones 1) I need to store the input signal array in a block of memory 2) I need to find the intersection between the input array and the kernel 3) I need to output the resulting array ex. input signal array is [1, 2, 3, 4, 5, 6, 7] kernel array is [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] the kernel size is 10 so half the 10 would be 5 --> index 4 in the kernel 1-In order to find …

Member Avatar
Member Avatar
+0 forum 1

Using tasm32. GetStdHandle returns INVALID_HANDLE_VALUE in eax register. .386 .model flat extrn GetStdHandle:PROC extrn ExitProcess:PROC .data .code start: push -11 call GetStdHandle push 0 call ExitProcess end start Other APIs work fine. just having problems with GetStdHandle. Any ideas?

Member Avatar
Member Avatar
+0 forum 1

Hello to all group members, Im having a problem with my assembler. I have installed MASM 6.11 and i have 'Windows 10'. Everything works out just fine, the compiler and all and even my programs are accurate as they get. The problem is that when im trying to go to "CODE VIEW" i get no response and an error comes that some external device is not attached. Someone please tell me what to do.. im a beginer and my teacher is assuming that its a hardware issue.

Member Avatar
Member Avatar
+0 forum 1

Write an assembly program that reads two integers from the user, X and Y, then stores the largest input into a variable called L. The program should show prompts to tell the user to enter the two numbers.

Member Avatar
Member Avatar
-2 forum 5

He , how do i print multibel line's i use de .inc from mikeos but don't knows how to loop like this: .message db 'hallo 1',0 db 'hallo 2',0 db 'hallo 3',0 for the moment i uze ;------------------------------------------------------ ; Install screens 1 ;------------------------------------------------------ BITS 16 ORG 32768 %INCLUDE "pirom_dev.inc" start: mov ax, .title_msg mov bx, .footer_msg mov cx, 10011111b ; Colour call os_draw_background ; call the db text mov si, .message ; call print line call os_print_string .message db 'Hallo en welkom to pirom cloud server', 0 .title_msg db 'Pirom could Setup Systeem', 0 .footer_msg db 'Setup ...', 0

Member Avatar
Member Avatar
+0 forum 1

i have installed nasm in ubuntu in linux but dont know how to and where to write code of assembly language and run my code please give me information as soon as possible.

Member Avatar
Member Avatar
+0 forum 9

Write an Assembly program that allows the user to enter a string of up to 99 characters. The program shall then replace all the digits with their corresponding words. The words shall be printed in all lower case or all upper case depend on the case of the last alphabet before the digits. Display the output string and the number of characters of the output string on the screen.

Member Avatar
Member Avatar
+0 forum 1

So i have my mips code that i want to do the follow thing: When i get a vowal (aeiou) it prints the next consonant from vowal (bfjpv). My code works 80% but when i do that it deletes the next char where i replace. Like: Bruno it must print Bruvnop but it only prints Bruvop (it deletes the next char from where i replace). My guess is i need to do +1 in the array, but i might be wrong (i already try it but it doesnt work).. Here is my code: .text .globl main main: # display prompt …

Member Avatar
Member Avatar
+0 forum 1

write a program in assembly that do the following: 1-ask from the user to choose the system of numbers(binary,hex,oct,dec) 2-then ask from the user to insert two values and mathematic operator ex: val1=any number not more than 8 bits. operator= (multiplication)or(division)or(-,+,^) val2=any number not more than 8 bits. 3-then do the mathematic operator between these two values and print the answer on the screen. 4-if one of the values that inserted from the user is not number then check it and do the following: a-every small letter must convert to capital letter then save these small letter are in the …

Member Avatar
Member Avatar
+0 forum 2

The End.