954,479 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Vehicle record struct

I got the basic understanding of what it is asking for the Declarations but im lost after the first question.

1) Declares a vehicle record as a struct with the fields: id, make, cost, sale price, profit (profit should be kept empty, it will be calculated in the program)
2) Reads an arbitrary number of vehicles and store them in an array of structs
3) Computes the profit field in and save it in each record
4) Finds the vehicle -id with the highest price and displays its information (fields)
5) Lists vehicle-ids with a profit less than a specified limit
6) Lists vehicle-ids with a price greater than a specified limit
7) Includes a function that reads a single vehicle record and appends it to the array of records
8) Includes a function that displays all fields of a specified ID
9) Includes a macro that handles the function in (4) above
10) Includes a macro that handles the function in (5) above
11) Have your program read input from a file (extra)

INCLUDE Debug\Lib_Inc\Irvine32.inc


Vehicle STRUCT
Idv BYTE "00000000"
Make BYTE 15 DUP(0)
Cost WORD 0
SalePrice WORD 0
Profit WORD ?
Vehicle ENDS
.data

vehicle1 Vehicle <>


.code
main PROC


EXIT
main ENDP
END main

Thank You for any help.

potpaLaptop
Newbie Poster
4 posts since May 2005
Reputation Points: 10
Solved Threads: 0
 

Do you know how to allocate arrays?

Do you know how to read a file?

If not, then you need to study them before doing the rest of this program.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: