Meaningless Drivel is fun!*
The moose likes Java in General and the fly likes Help Help Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic

Help Help Help

Carneige Roder

Joined: Nov 09, 2004
Posts: 5
I want my program to read in an arithmetic statement consisting of integers and the operators "+" and "-," and outputs a regular LMC assembly language program to a file that can then be assembled by the LMC assembler and run on the LMC.

For example, if the input statement (one line only) is
5 + 3 - 6 + 2

The output should be LMC assembly language program:
.DC NUM1 005
.DC NUM2 003
.DC NUM3 006
.DC NUM4 002

Ignored whitespace between characters in the arithmetic expression are ignored and assume that all of the integer values are positive.

Please help.
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

Please don't post the same quetion to multiple forums. It just wastes people's time. Since there's a reply in this copy, I'll leave that one open and close this one -- although this isn't really an advanced Java topic.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: Help Help Help
Similar Threads
Problem with Sort Method
program assignment help
Erroneous sym type What does this mean?
inpteractive input with println and!
Integer Object Comparision Confusion