News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

ASSEMBLY HELP

Started by samsam, May 09, 2020, 07:32:21 AM

Previous topic - Next topic

samsam

Hey guys, i'm new to assembly language and was just looking for some help on a few home work questions i was working on if that is at all possible. Feel free to email me if you think you can help. I am willing to tip for any help through paypal/venmo/cashapp

samsam

Its only 2 questions and I'll pay 20$

hutch--

samsam,

Just post your question, someone may be able to help you. This forum is not a commercial help venue. Also, NEVER make multiple posts or you will just get kicked out of here.

samsam

So sorry about that, this is my first time on this forum. Also, my deepest apologies if any took offense to my commercial approach, I am just very desperate and need help that I can't find anywhere else.

samsam

Hey guys sorry about the previous headache, it wont happen again. Here are the 2 questions i need help with;

Question 1:
Hexal, my new counting base, is base six; that is, there are six possible values for a digit (0,1,2,3,4,5 – just like counting on the fingers of your hand) as opposed to decimal (0..9) or hexadecimal which uses 0..F.  Write an assembly language program (with lots of comments) that reads in a sequence of hexal digits one at a time and stores the accumulated value entered in a single DWORD.  Input from the keyboard is read in a keystroke (a single character) at a time, examined for validity and, if valid, some magic is done and the new value thus far stored.  Read each digit using READCHAR until an "X" (= 58h) is entered and accumulate the value of the valid input digits in a single DWORD.  (HINT TO CHECK FOR VALID CHARACTERS: "0" is 30h, "1" is 31h, ... , "5" is 35h)

For example if I enter "1", then "2", then "5", the DWORD will contain 00000001h (= 1) after the first character is entered, 00000008h [= (1*6) +2] after the second character, 00000035h [= (1*6*6) + (2*6) + 5] after the third, etc. Think positional notation with a base of 6. Only the digits "0" through "5" and the letter "X" are valid. Don't assume that all entries will be valid. You should skip over any invalid character entries.


Question 2:
A palindrome is a string of characters that reads the same from right to left as from left to right (excluding capitalization and punctuation). "Madam, I'm Adam" is a palindrome.  So are "racecar" and "122.1", even "A Toyota". To prove something is a palindrome, you need to (1) remove punctuation (including spaces), (2) convert letters to lower case, and (3) work in from both ends comparing the characters to see if they're the same.  For example, if you're given a string "Able was I ere I saw Elba", you'd change it to "ablewasiereisawelba" and then compare character 0 with character 18, character 1 with character 17, etc., until you either matched all (it's a palindrome) or the paired characters don't match.

Numeric characters are ASCII 30h to 39h.  Upper case letters are 41h to 5Ah; lower case are 61h to 7Ah (hint: add 20h to an upper case letter to convert it to lower case). Consider anything else punctuation.

Your mission:  Write an assembly language program with lots of comments that reads in a string of at most 40 characters using READSTRING and determines if it's a palindrome. Use separate PROCs to remove the punctuation and to convert to lower case.



Any help at all would be appreciated! Thanks in advance.

jj2007

Over the years,  I've seen many attempts to ignore the no homework rule, but this one tops everything :greenclp:

samsam

Terribly sorry jj2007, like I stated earlier I am new to this forum and am desperately seeking help any help would be greatly appreciated.

hutch--

If you do your own work, people here will help you if they can but just dumping your homework assignments here is excluded by the forum rules. Unless we see some working code from you, this topic will be closed and removed.

nidud

#8
deleted

jj2007

Quote from: samsam on May 09, 2020, 11:57:05 AM
Terribly sorry jj2007, like I stated earlier I am new to this forum and am desperately seeking help any help would be greatly appreciated.

As Hutch wrote above: Post your code, and we'll help you. But you never bothered to read a book on assembly, or start coding, right? And your assignment is due when, tonight?