flat assembler
Message board for the users of flat assembler.

Index > Main > request 4Write an assembly code (8086) * in following patern

Author
Thread Post new topic Reply to topic
elil_12@yahoo.com



Joined: 23 Apr 2012
Posts: 4
Location: Colombo, Sri Lanka
elil_12@yahoo.com
Write a small program to print stars ascending and descending up to 7 levels like below.
User should be able to enter and value if the input is less than 100 stars should be printed in descending manner and
if the input is more than 100 stars should be printed in ascending manner. The program should loop until user enters 100.
Once the 100 is entered program should print 100 and exit.
(See the sample output section to see how the output)
Descending
*******
******
*****
****
***
**
*
Ascending
*
**
***
****
*****
******
*******
Write an assembly code (8086) to achieve the above mentioned.
You may use the “debug” command under windows environment or use Flat Assembler.
Note that this should be a console application.


Description: Original Assignment
Download
Filename: Assignment01_2012.pdf
Filesize: 548.9 KB
Downloaded: 326 Time(s)



Last edited by elil_12@yahoo.com on 24 Apr 2012, 10:24; edited 2 times in total
Post 23 Apr 2012, 17:45
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
diy!
Post 23 Apr 2012, 17:58
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Interesting. What is the school that uses FASM as an education compiler?
Post 23 Apr 2012, 18:01
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
elil_12@yahoo.com



Joined: 23 Apr 2012
Posts: 4
Location: Colombo, Sri Lanka
elil_12@yahoo.com
University
Post 23 Apr 2012, 18:25
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1408
Location: Toronto, Canada
AsmGuru62
elil_12:
It is unclear what do you need -- see my message.
Post 23 Apr 2012, 18:33
View user's profile Send private message Send e-mail Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
he needs that:

Code:
dothis:
cmp [input],100
je .print100
jg .ascending
.descending:
;descending code
ret
.print100:
;print 100 code
ret
.ascending:
;ascending code (that can be the same as descending if the function interface is well made.
ret
    

and will ask by pm to anybody connected to the board and not hidden.
Post 23 Apr 2012, 19:58
View user's profile Send private message Visit poster's website Reply with quote
elil_12@yahoo.com



Joined: 23 Apr 2012
Posts: 4
Location: Colombo, Sri Lanka
elil_12@yahoo.com
when run program out put should like bellow


Printing the stars.
Enter vale less than 100 to print starts from 7 to 1.
Enter value more than 100 to print starts from 1 to 7.
Enter value 100 to finish the loop.
Enter a valid Number: 075
*******
******
*****
****
***
**
*
Enter a valid Number: 115
*
**
***
****
*****
******
*******
Enter a valid Number: 211
*
**
***
****
*****
******
*******
Enter a valid Number: 055
*******
******
*****
****
***
**
*
Enter a valid Number: 100
Bye.
Post 24 Apr 2012, 07:20
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17255
Location: In your JS exploiting you and your system
revolution
Homework help should be stated in the request so that people know that they will be helping you pass some test.
Post 24 Apr 2012, 08:32
View user's profile Send private message Visit poster's website Reply with quote
elil_12@yahoo.com



Joined: 23 Apr 2012
Posts: 4
Location: Colombo, Sri Lanka
elil_12@yahoo.com
Do u mean subject of forum should start with request... some thing?

I couldn't get you?
Post 24 Apr 2012, 10:24
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17255
Location: In your JS exploiting you and your system
revolution
Something like this:

Please help me with my homework. I have this problem ...

Also you should post the code that you have done so far to show that you are at least trying to solve this problem yourself. Perhaps you are stuck with something specific? You can't expect us to write your homework for you but we would be happy to help you for problems with fasm or the x86 instructions.
Post 24 Apr 2012, 10:41
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.