fireurza Posted November 6, 2013 Member ID: 677 Group: ***- Inactive Clan Members Followers: 18 Topic Count: 172 Topics Per Day: 0.03 Content Count: 1457 Content Per Day: 0.25 Reputation: 791 Achievement Points: 9890 Solved Content: 0 Days Won: 5 Joined: 11/02/09 Status: Offline Last Seen: January 16, 2024 Birthday: 02/20/1986 Posted November 6, 2013 does anyone know how to program masm? i am having some big problems with a homework assignment and could use some help. msg me here if you can help Awards
LordOfChaos Posted November 6, 2013 Member ID: 3174 Group: **- Inactive Registered Users Followers: 100 Topic Count: 78 Topics Per Day: 0.02 Content Count: 2162 Content Per Day: 0.44 Reputation: 1645 Achievement Points: 17423 Solved Content: 0 Days Won: 1 Joined: 02/03/12 Status: Offline Last Seen: July 27, 2017 Birthday: 07/24/1957 Posted November 6, 2013 What is masm? I used to program years ago, but never heard of that language.. If it is one
fireurza Posted November 6, 2013 Member ID: 677 Group: ***- Inactive Clan Members Followers: 18 Topic Count: 172 Topics Per Day: 0.03 Content Count: 1457 Content Per Day: 0.25 Reputation: 791 Achievement Points: 9890 Solved Content: 0 Days Won: 5 Joined: 11/02/09 Status: Offline Last Seen: January 16, 2024 Birthday: 02/20/1986 Author Posted November 6, 2013 masm is assembly language for x86 processors Awards
LordOfChaos Posted November 6, 2013 Member ID: 3174 Group: **- Inactive Registered Users Followers: 100 Topic Count: 78 Topics Per Day: 0.02 Content Count: 2162 Content Per Day: 0.44 Reputation: 1645 Achievement Points: 17423 Solved Content: 0 Days Won: 1 Joined: 02/03/12 Status: Offline Last Seen: July 27, 2017 Birthday: 07/24/1957 Posted November 6, 2013 The 8086 chip. Holy crap I used to program the 8086and the 8088 chip set way back ing the mid 80's. I'm sure that's not what ur talking about...
LordOfChaos Posted November 6, 2013 Member ID: 3174 Group: **- Inactive Registered Users Followers: 100 Topic Count: 78 Topics Per Day: 0.02 Content Count: 2162 Content Per Day: 0.44 Reputation: 1645 Achievement Points: 17423 Solved Content: 0 Days Won: 1 Joined: 02/03/12 Status: Offline Last Seen: July 27, 2017 Birthday: 07/24/1957 Posted November 6, 2013 Lol fire, they were just phasing out bloody punch cards when I started programming. Some whiz kid invented the keyboard! And then they invented the word processor. What an innovative time that all was. I think my age is showing now,,,
fireurza Posted November 6, 2013 Member ID: 677 Group: ***- Inactive Clan Members Followers: 18 Topic Count: 172 Topics Per Day: 0.03 Content Count: 1457 Content Per Day: 0.25 Reputation: 791 Achievement Points: 9890 Solved Content: 0 Days Won: 5 Joined: 11/02/09 Status: Offline Last Seen: January 16, 2024 Birthday: 02/20/1986 Author Posted November 6, 2013 Lol assembly language is a requirement for my degree. It is far to confusing for me.... i cant wrap my head around that much info being pushed around... im not good at remember to put in notes lol Awards
fireurza Posted November 6, 2013 Member ID: 677 Group: ***- Inactive Clan Members Followers: 18 Topic Count: 172 Topics Per Day: 0.03 Content Count: 1457 Content Per Day: 0.25 Reputation: 791 Achievement Points: 9890 Solved Content: 0 Days Won: 5 Joined: 11/02/09 Status: Offline Last Seen: January 16, 2024 Birthday: 02/20/1986 Author Posted November 6, 2013 if you feel like giving it a shot an helping me my yahoo id is in my profile Awards
LordOfChaos Posted November 6, 2013 Member ID: 3174 Group: **- Inactive Registered Users Followers: 100 Topic Count: 78 Topics Per Day: 0.02 Content Count: 2162 Content Per Day: 0.44 Reputation: 1645 Achievement Points: 17423 Solved Content: 0 Days Won: 1 Joined: 02/03/12 Status: Offline Last Seen: July 27, 2017 Birthday: 07/24/1957 Posted November 6, 2013 Yea, it does require a certain level of concentration. I did program in assembler in the mid 80's but haven't touched it since. I am sure there is a wealth of information and many many routines accessible on the net somewhere. So when you say the x86 processors, are you referring to the very first 8086 chip set or the 80286, 80386 and 80486 chips? I can vaguely remember it. Accessing registers directly, popping them, jumping etc... Lol boy boy you woke some memories here!
LordOfChaos Posted November 6, 2013 Member ID: 3174 Group: **- Inactive Registered Users Followers: 100 Topic Count: 78 Topics Per Day: 0.02 Content Count: 2162 Content Per Day: 0.44 Reputation: 1645 Achievement Points: 17423 Solved Content: 0 Days Won: 1 Joined: 02/03/12 Status: Offline Last Seen: July 27, 2017 Birthday: 07/24/1957 Posted November 6, 2013 Well, we have 2 problems here, I don't have proper internet ATM, I am tethering my android phone to my iPad, just so I don't die of boredom, and keep in touch with the gang. The second thing is it has been so bloody long, that I hardly remember it all. I would have to do some serious reading to get back up to speed. What kind of time line are you looking at, and what degree of program is required? Is it advanced, or just basic stuff?
LordOfChaos Posted November 6, 2013 Member ID: 3174 Group: **- Inactive Registered Users Followers: 100 Topic Count: 78 Topics Per Day: 0.02 Content Count: 2162 Content Per Day: 0.44 Reputation: 1645 Achievement Points: 17423 Solved Content: 0 Days Won: 1 Joined: 02/03/12 Status: Offline Last Seen: July 27, 2017 Birthday: 07/24/1957 Posted November 6, 2013 (edited) I'm not sayin no... But I will have to get back up to speed, and that could take a bit of time. Here's a link you can check out. I am going to start reading it all again, so if you have and specific problems, let me know so I can try to concentrate on that. http://cs.smith.edu/~thiebaut/ArtOfAssembly/artofasm.html Remember everything is in hexadecimal math. . Base 16 math. Not fun to follow for sure. Edited November 6, 2013 by LordOfChaos
fireurza Posted November 6, 2013 Member ID: 677 Group: ***- Inactive Clan Members Followers: 18 Topic Count: 172 Topics Per Day: 0.03 Content Count: 1457 Content Per Day: 0.25 Reputation: 791 Achievement Points: 9890 Solved Content: 0 Days Won: 5 Joined: 11/02/09 Status: Offline Last Seen: January 16, 2024 Birthday: 02/20/1986 Author Posted November 6, 2013 its just basic stuff. here is a copy and paste of the assignment Write an assembly language program that solves the following problem. The Albatross Company has four salespeople (1 to 4) who sell five different products (1 to 5). Once a day, each salesperson reports their sales of each product. These reports are consolidated over time into a file. Each record in the file contains three values: • The salesperson number from 1 to 4 (3 characters wide, right justified) • The product number from 1 to 5 (3 characters wide, right justified) • The dollar value of that product sold that day by that salesperson (9 characters wide, right justified) Your program must prompt the user for a file name, process the file, and report the totals for each salesperson and for each product. A sample data file called “Albatross.dat†is provided to allow you to test your program. Your program must be able to handle a data file that contains any number of sales records. This means that it is possible for the input data file to contain multiple records for each salesperson and product combination. Do not write your program so that it always (and only) expects the number of records that happen to be in the sample data file. Your program will be tested and graded by executing it with a data file that contains fewer records than the sample data file, the sample data file, and finally with a data file that contains more records than the sample data file. Awards
fireurza Posted November 6, 2013 Member ID: 677 Group: ***- Inactive Clan Members Followers: 18 Topic Count: 172 Topics Per Day: 0.03 Content Count: 1457 Content Per Day: 0.25 Reputation: 791 Achievement Points: 9890 Solved Content: 0 Days Won: 5 Joined: 11/02/09 Status: Offline Last Seen: January 16, 2024 Birthday: 02/20/1986 Author Posted November 6, 2013 I am horrible with arrays and i need to take 3 different pieces of data from a file and populate a two dimensional array. i cannot for the life of me figure out how to take info from the file an populate the array with it Awards
LordOfChaos Posted November 6, 2013 Member ID: 3174 Group: **- Inactive Registered Users Followers: 100 Topic Count: 78 Topics Per Day: 0.02 Content Count: 2162 Content Per Day: 0.44 Reputation: 1645 Achievement Points: 17423 Solved Content: 0 Days Won: 1 Joined: 02/03/12 Status: Offline Last Seen: July 27, 2017 Birthday: 07/24/1957 Posted November 6, 2013 Hmmm... Data base management at its lowest level. To be honest, it would probably take me a while to get my skill set back to where I can actually write again. Do you have any sample assembler program? So I can read them. You could take some routines already written to access the .dat file, as well as prompt the user, these are all out there somewhere. All you really need to do is find these modules, and make them work together. Most good programmers comment the hell out of their routines,. It makes it easier to read. So for example: Search for a routine that puts values on the screen. That is the prompt. Then you need another module to accept the input from the user. You probably already thought of all that. Even when I was in school learning, we all kept our processes, and reused them over and over. I really wish I could help you, but doing the actual programming would take me a few weeks in the least to get some basic knowledge back in my brain. Try to build your routines with a flow chart first. Map it all out how you see the program interacting with the user interfaces, and the .dat file. Of course you would have to have an eof (end of file) marker so you can put everything in a "do while" loop until it encounters the EOF marker. That will fix the random number of data entries they require. When is this due?
fireurza Posted November 6, 2013 Member ID: 677 Group: ***- Inactive Clan Members Followers: 18 Topic Count: 172 Topics Per Day: 0.03 Content Count: 1457 Content Per Day: 0.25 Reputation: 791 Achievement Points: 9890 Solved Content: 0 Days Won: 5 Joined: 11/02/09 Status: Offline Last Seen: January 16, 2024 Birthday: 02/20/1986 Author Posted November 6, 2013 here is some sample.... its what i have so far lol http://stackoverflow.com/questions/19781702/assembler-cant-figure-out-where-to-go-from-here Awards
LordOfChaos Posted November 6, 2013 Member ID: 3174 Group: **- Inactive Registered Users Followers: 100 Topic Count: 78 Topics Per Day: 0.02 Content Count: 2162 Content Per Day: 0.44 Reputation: 1645 Achievement Points: 17423 Solved Content: 0 Days Won: 1 Joined: 02/03/12 Status: Offline Last Seen: July 27, 2017 Birthday: 07/24/1957 Posted November 6, 2013 Well my forte in programming was database management... Hence arrays. Not that difficult. The easiest way to do it is imagine a spread sheet, like excel. That would be how the output would be configured. But your file is sequential, and each record or entry into the file would consist of a line of data. They gave you the specs. You got 4 sales people, and 5 products. You have to have an 3 digit number with the right most being the sales persons I'd. . 001, 002, 003, Then the products have 4 digit id's. 0001,0002,0003,0004. Then the value of the sale, being 9 digits. 000002134 <~ 21.34$ so one record would in sequence 00010003000002134. Salesman # 1 sold product 3 for 21.34$ then you have some end of record marker to tell your process that the next record starts there. And so forth until you have an end of file marker... Am I wasting your time here? Is this what you are looking for?
LordOfChaos Posted November 6, 2013 Member ID: 3174 Group: **- Inactive Registered Users Followers: 100 Topic Count: 78 Topics Per Day: 0.02 Content Count: 2162 Content Per Day: 0.44 Reputation: 1645 Achievement Points: 17423 Solved Content: 0 Days Won: 1 Joined: 02/03/12 Status: Offline Last Seen: July 27, 2017 Birthday: 07/24/1957 Posted November 6, 2013 Ok so you need a variable that stores the accumulated values of each sale for each salesperson. The language is somewhat familiar, but not enough for me to follow the routines. I can see the concept fairly well. But I can't read the program well enough to follow. The easiest way to visualize it is to see one record as a string of characters. Each value like the salesmans Id is in the same position every time for each record. You have a string with 3 values in it, first 3 chars are the salesman I'd, the next 4 chars is the product Id then the last 9 chars is the value of the $ sold for that sale. If every record has the exact number of chars in the string, then you know you have to read 16 characters to get one record. Then the next 16 and so forth, until you encounter the EOF marker. I think I may be confusing you more than anything.
LordOfChaos Posted November 6, 2013 Member ID: 3174 Group: **- Inactive Registered Users Followers: 100 Topic Count: 78 Topics Per Day: 0.02 Content Count: 2162 Content Per Day: 0.44 Reputation: 1645 Achievement Points: 17423 Solved Content: 0 Days Won: 1 Joined: 02/03/12 Status: Offline Last Seen: July 27, 2017 Birthday: 07/24/1957 Posted November 6, 2013 Where are you located? USA? If so I can call you on my phone. I got unlimited LD in northamerica
LordOfChaos Posted November 6, 2013 Member ID: 3174 Group: **- Inactive Registered Users Followers: 100 Topic Count: 78 Topics Per Day: 0.02 Content Count: 2162 Content Per Day: 0.44 Reputation: 1645 Achievement Points: 17423 Solved Content: 0 Days Won: 1 Joined: 02/03/12 Status: Offline Last Seen: July 27, 2017 Birthday: 07/24/1957 Posted November 6, 2013 I have read your questions and I think I am on the right track. If you can program the routines, but can't seem to organize the data, then I can help. It's how you store the values in variables, then access them to Mae the output appear in the array you are talking about. I understand databases really well... Shit if you saw the tables I created in this telco I used work for in the 90s .. Imagine a telephone company with only certain info on each call... Cuts no, time call was made, origin of call, destination of the call, and duration of the call. Then there were all these cross reference tables to determine what discount we gave in what regions in the world, and at what time of say as discounts were given in non peak hours... Lol and I have to create a program that actually made sense of all that and produced a bill for each customer. This is much the same you need here, without all the cross tables, you have all the data you need in each record. All you need to do is store the values in variables, add to them them output them in the appropriate format. Is this what you are stuck with?
LordOfChaos Posted November 6, 2013 Member ID: 3174 Group: **- Inactive Registered Users Followers: 100 Topic Count: 78 Topics Per Day: 0.02 Content Count: 2162 Content Per Day: 0.44 Reputation: 1645 Achievement Points: 17423 Solved Content: 0 Days Won: 1 Joined: 02/03/12 Status: Offline Last Seen: July 27, 2017 Birthday: 07/24/1957 Posted November 6, 2013 Sorry I couldn't be of more help. Let me know how you do.
fireurza Posted November 6, 2013 Member ID: 677 Group: ***- Inactive Clan Members Followers: 18 Topic Count: 172 Topics Per Day: 0.03 Content Count: 1457 Content Per Day: 0.25 Reputation: 791 Achievement Points: 9890 Solved Content: 0 Days Won: 5 Joined: 11/02/09 Status: Offline Last Seen: January 16, 2024 Birthday: 02/20/1986 Author Posted November 6, 2013 Sorry internet went out for a bit. I get the basic format of the array so far essentially i am doing something like this tableA DWORD ?, ?, ?, ? Rowsize = ($ - tableA) DWORD ?, ?, ?, ? DWORD ?, ?, ?, ? DWORD ?, ?, ?, ? DWORD ?, ?, ?, ? then I want to take the info from the file and store it in that array.... that is where i am having problems. I cannot seem to find a way to do that. the table that I am thinking of is something like this | 1 | 2 | 3 | 4 | 1|1000|3000|5000|6000| 2|3000|2000|7000|8000| 3|1500|2500|3500|4500| 4|2000|1000|5000|3000| 5|1000|1000|1000|6000| where the numbers on the top represent the saleperson id number and the column number and the numbers on the left side represent the product id number and the row number the numbers inside are the amounts sold so i want to go to the first line in the file and read the first 3 digits which is **1 (* = blank space) and assign that to a register. then go to the second element which is also **1 and store that in another register. then i want to go to the 3rd element which is *****1000 and store that in the actual array spot of 1,1... or the first element column second elements row. but i cannot for the life of me figure out how to do that the thing is i know how i am supposed to solve this but i cannot take that and put it into code and it is really pissing me off Awards
LordOfChaos Posted November 6, 2013 Member ID: 3174 Group: **- Inactive Registered Users Followers: 100 Topic Count: 78 Topics Per Day: 0.02 Content Count: 2162 Content Per Day: 0.44 Reputation: 1645 Achievement Points: 17423 Solved Content: 0 Days Won: 1 Joined: 02/03/12 Status: Offline Last Seen: July 27, 2017 Birthday: 07/24/1957 Posted November 6, 2013 Try this link and see if it helps. http://www.tutorialspoint.com/assembly_programming/assembly_arrays.htm Read this... Apparently you have to cheat to create a multidimensional array inx86... Assembly language doesn't have the concept of a "multidimensional array", at least not directly. You will need to allocate the total amount of space (16 elements in your case), and handle the row/column offset calculations yourself. share|improve this answer answered Oct 5 '11 at 2:18 Greg Hewgill 310k65597795 I understand. I have been trying to read through the following link webster.cs.ucr.edu/AoA/Windows/HTML/Arraysa2.html but I am getting more confused then before. Do you happen to have any other resources that might assist? – Nic Young Oct 5 '11 at 2:27 Hey, that looks like a great reference, it's the sort of thing I would have pointed you at if you hadn't said that you already were looking at it. Do you have any specific questions we can help with? – Greg Hewgill Oct 5 '11 at 2:30 I know how to declare a 1 dimensional array array BYTE val1, val2, val3, val4 but I am having a hard time understanding how to go about doing that for a 4x4 array – Nic Young Oct 5 '11 at 2:37 Well, one way would be array BYTE val11, val12, val13, val14, val21, val22, ..., val43, val44 (16 values in total). Then, to index into the array, multiply the row value by 4, add the column, and offset that into array. – Greg Hewgill Oct 5 '11 at 2:39 I see it makes more sense now. So declare a 1 dimensional array but arrange the values in such a way it can be treated as 4x4 still. That is exactly what I needed. Thank you! – Nic Young Oct 5 '11 at 2:59 What he did here is creat a one dimensional array, 16 values, then he offsets it by 4 and thus you get your 4 x 4 array... It's confusing even to me but I think I get the concept. That is why you are havin so much trouble, cause you are thinking your creating a 2 dimensional array, but in reality it's only 1 dimensional. This is beyond my current understanding. We have some good computer folk here, so reach out again, and see if someone else can help. And remember there is no problem you have, that someone else has already solved.... Google the crap out of your problems, and someone will find you a solution. If I understand what he has done above, he created a single dimensional array, with 16 values. Then he offsets, or accesses every 4 values to creating his 4 x 4 array.. But apparently you have to do it yourself. Keep me posted and let me know when you have solved it. This is going to be one of those moments that when you do figure it all out, it is going to hit you in the head and open your eyes wide.
LordOfChaos Posted November 10, 2013 Member ID: 3174 Group: **- Inactive Registered Users Followers: 100 Topic Count: 78 Topics Per Day: 0.02 Content Count: 2162 Content Per Day: 0.44 Reputation: 1645 Achievement Points: 17423 Solved Content: 0 Days Won: 1 Joined: 02/03/12 Status: Offline Last Seen: July 27, 2017 Birthday: 07/24/1957 Posted November 10, 2013 Sorry internet went out for a bit. I get the basic format of the array so far essentially i am doing something like this tableA DWORD ?, ?, ?, ? Rowsize = ($ - tableA) DWORD ?, ?, ?, ? DWORD ?, ?, ?, ? DWORD ?, ?, ?, ? DWORD ?, ?, ?, ? then I want to take the info from the file and store it in that array.... that is where i am having problems. I cannot seem to find a way to do that. the table that I am thinking of is something like this | 1 | 2 | 3 | 4 | 1|1000|3000|5000|6000| 2|3000|2000|7000|8000| 3|1500|2500|3500|4500| 4|2000|1000|5000|3000| 5|1000|1000|1000|6000| where the numbers on the top represent the saleperson id number and the column number and the numbers on the left side represent the product id number and the row number the numbers inside are the amounts sold so i want to go to the first line in the file and read the first 3 digits which is **1 (* = blank space) and assign that to a register. then go to the second element which is also **1 and store that in another register. then i want to go to the 3rd element which is *****1000 and store that in the actual array spot of 1,1... or the first element column second elements row. but i cannot for the life of me figure out how to do that the thing is i know how i am supposed to solve this but i cannot take that and put it into code and it is really pissing me off Hey bud, did you sort this out? Hope so.
Recommended Posts