MARIE program to calculate some basic statistics on a list of positive numbers. The program will ask users to input the numbers one by one. Assume that all numbers will be in the range 1 to 1000. To terminate the data entry, the user will input any negative number. Once the data entry is complete, the program will show four statistics about the list of numbers: (i) Count, (ii) Minimum value, and (iii) Sum of the numbers. As an example, if the user enters the following decimal numbers as input (one after the other) 23, 6, 78, 36, 3, 250, …

Member Avatar
Member Avatar
+0 forum 1

Hi, I am a newbie here, Recently I was working with H3LIS331DL 3-Axis Linear Accelerometer I²C Mini Module Here is code for the X, Y, Z-axis. #include <Wire.h> // H3LIS331DL I2C address is 0x18(24) #define Addr 0x18 void setup() { // Initialise I2C communication as MASTER Wire.begin(); // Initialise Serial Communication, set baud rate = 9600 Serial.begin(9600); // Start I2C Transmission Wire.beginTransmission(Addr); // Select control register 1 Wire.write(0x20); // Enable X, Y, Z axis, power on mode, data output rate 50Hz Wire.write(0x27); // Stop I2C Transmission Wire.endTransmission(); // Start I2C Transmission Wire.beginTransmission(Addr); // Select control register 4 Wire.write(0x23); // Set …

Member Avatar
Member Avatar
+0 forum 1

[org 0x0100] n1: db 1 n2: db 2 largest: db 0 mov ax, byte[n1] mov bx, byte[n2] cmp ax,bx jg next mov [largest],bx jmp endrtn next:mov [largest],ax endrtn: mov ax, 0x4c00 int 0x21 error in line 6 and 7 error is mismatch in operand sizes

Member Avatar
Member Avatar
-1 forum 1

[org 0x0100] num: db 0 factorial: dw 1 VUID: db 1,2,3,4,5,6,7,8 mov bx,0 jmp start fact: mov ax, byte[num] fact_loop: mul word[factorial] sub ax,1 cmp ax,0 jg fact_loop ret start: mov bx,0 mov cx,[VUID+bx] add bx,1 shr cx,1 jc start mov [num],cx call fact mov ax, 0x4c00 int 0x21

Member Avatar
Member Avatar
+0 forum 1

[org 0x0100] num: db 0 factorial: dw 1 VUID: db 1,2,3,4,5,6,7,8 mov bx,0 jmp start fact: mov ax, byte[num] fact_loop: mul word[factorial] sub ax,1 cmp ax,0 jg fact_loop ret start: mov bx,0 mov cx,[VUID+bx] add bx,1 shr cx,1 jc start mov [num],cx call fact mov ax, 0x4c00 int 0x21 when i treid to run upper program in nasm it shows an error :8:error: mismatch in operand sizes

Member Avatar
Member Avatar
+0 forum 1

i'm really struggling with this pseudocode to convert it to MARIE Input a number Assign this number to x if(x <y) x = x + y; z=z+w; else y=y-w; Print the value of the accumulator. x, Dec 0 y, Dec 2 z, Dec 5 w, Dec 1

Member Avatar
Member Avatar
+0 forum 2

Hi, I apologize if my english is bad, I need some help printing the value of a variable in the code that I show below, I'm using emu8086 and I need that this works in this code example that is the same that comes in the examples of emu8086 (PrinterDemo.asm) with a little of modification that is of what I need to print. Thanks for your help [CODE] ; the printer demonstration. ; this is simplified/ms-dos complatible version. ; this example may not work on Windows XP, however it may work for Windows 95/98: ; http://support.microsoft.com/default.aspx?scid=kb;en-us;Q258878 ; the printer device …

Member Avatar
Member Avatar
+1 forum 2

Has been looking at different methods like using a look-up table or double-dabble, but have up to this moment not found any algoritm that do the work most effectively. The 64 bit value is delivered to the routine in two 32 bits registers (upper,lower). I am writing a larger project for PIC 32 microcontroller, and have already made a large library for this controller in MIPS, so I know basic MIPS.

Member Avatar
Member Avatar
+0 forum 1

A friend and I are talking about taking our hobby of printing funny T-shirts into a living, and start our own website in Sydney. And then we need to find a cheap marketing company who can provide support and have experiences in helping start-up companies. Anyone who knows a marketing company in Sydney, matching that description?

Member Avatar
Member Avatar
+0 forum 1

Enter your answer: Cucumber You got the wrong answer... but it should be correct answer Data Segment input db "Enter Your Answer: $" g db 20 dup('$') ; strlen1 db $-g str2 db 'cucumber','$' strlen2 db $-str2 streq db 10,13,'You got the correct answer','$' struneq db 10,13,'You got the Wrong answer','$' Data Ends Code Segment Assume cs:code, ds:data Begin: mov ax, data mov ds, ax mov es, ax mov ah,09h lea dx,input int 21h MOV AH,0AH MOV DX,SI INT 21H lea si,g lea di, str2 mov cx, 3 mov al, strlen1 mov bl, strlen2 cmp al, bl jne Not_Equal repe …

Member Avatar
+0 forum 0

I am trying to figure out why my answer still wrong even though I type the cucumber... .model small .stack 100h data segment str1 db "Enter Your answer: $" after db "Your answer is: $" answer db "Cucumber$" input db 20 dup("$") newline db 10,13, "$" correct db "Your Answer is correct$" wrong db "Your Answer is wrong$" data ends code segment assume ds:data,cs:code start: mov ax,data mov ds,ax lea si, input lea di, answer ;get input mov ah,09h lea dx,str1 int 21h mov ah,0ah mov dx,si int 21h mov ah,09h lea dx, newline int 21h ;print string mov ah,09h …

Member Avatar
Member Avatar
+0 forum 1

How to put a time limit to the input function in assembly

Member Avatar
Member Avatar
+0 forum 1

Hey guys, I need some help with a Marie simulator...I need to write a program that takes numbers from 0-100 and then prints F(fail) if the number is <50 and P(pass) if the number is >49 and <101 needs to stop at 10 results. If someone can help me I would be very thankful.!!

Member Avatar
Member Avatar
+0 forum 1

I'm just starting out with Assembly languege, having installed NASM on openSUSE 13.1, i386 family processor yesterday. My worry is that a simple program like "Hello World!" has flagged a warning when linking...see line 3 below: 1. coker.mu@linux-jm54:~/nasm> nasm -f elf helloWorld.asm 2. coker.mu@linux-jm54:~/nasm> ld -m elf_i386 -s -o helloWorld helloWorld.o 3. ld: warning: cannot find entry symbol _start; defaulting to 0000000008048080 4. coker.mu@linux-jm54:~/nasm> ls -l 5. total 12 6. -rwxr-xr-x 1 coker.mu users 360 Dec 19 21:06 helloWorld 7. -rw-r--r-- 1 coker.mu users 429 Dec 19 21:04 helloWorld.asm 8. -rw-r--r-- 1 coker.mu users 624 Dec 19 21:05 helloWorld.o Even …

Member Avatar
Member Avatar
+0 forum 5

Hello; can anyone help me with creating a stack in wombat machine simulator. I don't have any Idea of how it should be implemented.

Member Avatar
Member Avatar
+0 forum 1

I was wandering aimlessly on google, I found [ReactOS](https://www.reactos.org/). It's interesting. I tried this OS, many windows applications are running well on it. But some latest applications are unable to run like **Firefox 65.0.1** I have few questions, * How worth is using this OS? * What is future of this OS? * How secure is this OS? * What development is required to run latest applications? * How to search books & tuts, which are useful for this OS development? * Can anybody help me here to compile & edit some part of OS (I would like to do …

Member Avatar
Member Avatar
+0 forum 13

I have questions: 1) Program to get input from user till 'z' or 'Z' is inputted the program will check for the chars, and print (new line) small chars (new line) big chars (new line) numbers [without 'z' or 'Z'] can't use variables. only Stack. example : input: ASdf154sdgdf123vcvbz Small chars: dfsdgdfvcvb Big chars: AS Numbers: 154123 This is code for question 1: STA SEGMENT STACK DB 100H DUP (0) STA ENDS CODE SEGMENT ASSUME CS:CODE,SS:STA MAIN: MOV BP, SP MOV BX, BP SUB BP, 2 MOV CX, 0 INPUT: MOV AH, 01H INT 21H INC CX CMP AL, 'z' …

Member Avatar
Member Avatar
+0 forum 1

I have to get from user up to 8 letter to string, and print the string in reverse. There is my code : STA SEGMENT STACK DB 100H DUP (0) STA ENDS DATA SEGMENT MSG1 DB 'ENTER STRING (Maximum is 8) : $' MSG2 DB 'REVERS IS : $' ISTR DB 10,?,10 DUP('$') DATA ENDS CODE SEGMENT ASSUME CS:CODE,DS:DATA,SS:STA MAIN: MOV AX, DATA MOV DS, AX LEA DX, MSG1 MOV AH, 09H INT 21H MOV DX, 0 ;INPUT MOV DX, OFFSET ISTR MOV AH, 0AH INT 21H MOV SI, OFFSET ISTR MOV CX, [SI+1] ADD SI, 2 MOV DX, 0 …

Member Avatar
Member Avatar
+0 forum 1

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

The End.