News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

MASM mini project

Started by ayu1980, September 27, 2007, 03:14:15 AM

Previous topic - Next topic

ayu1980

Good Day everybody,
Need to ask help about MASM. Im using MASM 615. Im a new beginner. Im not relly understand to do program using MASM.
I need to do 1 mini project for my class assignment. But I don't know how to do because I only learn the basic coding in class such as 'move'.

Can anyone help me?

For your mini project, you are assigned to design and develop a simple book listing system for Company PELANGI. The explanation below is a simple walk-through of the book listing system.

•   Company user must use a valid username and password to enter the system.

•   The main menu book listing systems is as follows.

•   The menu for [1] DISPLAY options is as follows.

•   The menu for [2] SEARCH options is as follows.

•   Company user must input a year or ISBN number to search in the book listing system

•   Below are screenshots for display options.

o   All Books Sorted By Price

o   All Books Sorted – Low Price Category

o   All Books Sorted – Medium Price Category

o   All Books Sorted – High Price Category


•   Below are screenshots for search options.

o   Search – By Year (Year=2004)

o   Search – By ISBN (ISBN=2991)

•   You are allowed to use any kind of data types that you have learned in your assembly language class. The defining data
                 segment must have these data definitions.
ISBN      YEAR       PRICE      AUTHOR                   TITLE
2991      2004      28      Irvine      COBOL Program   
2231      2004      78      Tan      C++ Program      
2211      2003      63      Samy      Data Structure      
8910      2005      86      John      Java Program      
4531      2002      50      Kent      Assembly Language
0910      2000      100      Ali      C Program      

•   Your mini project must sort the data before being displayed as shown in screenshot at display option section. For sorting data, you have use bubble sort algorithm.
void bubbleSort(int numbers[], int array_size)
{
  int i, j, temp;

  for (i = (array_size - 1); i >= 0; i--)
  {
    for (j = 1; j <= i; j++)
    {
      if (numbers[j-1] > numbers[j])
      {
        temp = numbers[j-1];
        numbers[j-1] = numbers[j];
        numbers[j] = temp;
      }
    }
  }
}

•   Your mini project must also categorized data as shown in screenshot at display option section. Books are divided into three (3) categories based on following rules.

Low Price Category   Range : 1 to 30
Medium Price Category   Range : 31 to 70
High Price Category   Range : 71 to 100




Thank you 

hutch--

ayu1980,

While members here will help you if they can, no-one will do your homework for you and this includes your class assignment. Our rules specifically exclude homework requests so please do not make requests in this form. If you start writing your own code members here will help you if they can but no-one will write it for you.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

ayu1980

can I know where can I refer for the source code to learn more about MASM coding? I will start doing myself and ask if having the problem later. Tq

hutch--

ayu1980,

The definition of your course work is something you should be getting from your own school or university. Once you start to write your own code members here will probably help you but they wil not do your work for you.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

ayu1980

I know, but my lecturer only teach the basic coding such as move, loop, add, minus, mod. We need to find outside source to learn more bcoz this quite tough to me coz we only spend 18 hrs for the short term in this semester( I am part time student). That why I need help to know any website that i can refer to learn more about MASM coding. Exspecially to do coding for enter username and password.

the example coding that i learn is like this:

TITLE Program Template           (Prog1.asm)

; Program Description:
; Author:masayu ibrahim
; Creation Date:11/08/07
; Revisions: 1
; Date:11/08/07              Modified by:

INCLUDE Irvine32.inc
.data

CUBA1 BYTE 33H
CUBA2 WORD 55FFH ;
TOLAK SBYTE 1H
.code
main PROC
; (KOSONGKAN SEMUA GENERAL PURPOSE REGISTER)

MOV EAX,0
MOV EBX,0
MOV ECX,0
MOV EDX,0

CALL DUMPREGS

MOV EAX,56H

CALL DUMPREGS

MOV EAX,56H
MOV EBX,EAX
MOV CX,CUBA2

CALL DUMPREGS

MOVZX ECX,CUBA1

CALL DUMPREGS

MOVZX ECX,TOLAK

CALL DUMPREGS

MOV EAX,0
MOV EDX,0
MOV AX,0AAAAH
MOV DX,0BBBBH

CALL DUMPREGS

XCHG AX,BX

CALL DUMPREGS

XCHG AL,CUBA1

CALL DUMPREGS

exit
main ENDP
; (insert additional procedures here)
END main

MichaelW

So basically you're stuck having to learn MASM coding mostly on your own, without anyone to spoon-feed you the knowledge. If we seem unsympathetic, it's because that's how many/most of us learned to program. :lol

The MASM Programmer's Guide in CHM format is available here.

The programmer's guide contains many small code examples of how to code with MASM.

And a complete set of MASM manuals is available here.

If you have the Irvine book then you have a working set of examples, library procedures, macros, etc.

Iczelion's tutorials, complete with all the text explaining the code, are available here.

And Iczelion's tutorials are, or at least were, available in CHM format, but I can't seem to find a link.

For information on the Windows API, you can start here, or download an install a suitable version of the PSDK.

And there are many examples in the MASM32 package, and many more have been posted to this forum.

If you have a high-level language that you are familiar with, it might be easier to create the project in that language, and then once you get the design finalized and the bugs out, translate it to MASM code.
eschew obfuscation

Tedd

Considering that the bubble-sort given is in C, are you meant to be writing this project in C?
For the small amount of time you have, I wouldn't expect you have to learn assembler and implement it all in assembler (using MASM.) Whereas it is much shorter to make in C.
If you're trying to do this to 'show off' then very well, but you need to keep in mind that whoever is marking it will probably need to understand it. So if it's meant to be in C, I would suggest you bite and write it in C.
No snowflake in an avalanche feels responsible.