Realize also that if you wanted to use 2 instead of 54, you could just change one spot, numcols equ 54, to numcols equ 2. That's a big part of the purpose of using equ. Your code still doesn't make a lot of sense. Maybe it's not all shown. When you call a subroutine, the subroutine needs to end with a return statement. Any parameters passed to the subroutine need to be removed. The return value, if any, needs to be dealt with.
Your description of the problem is pretty good, but there are a number of issues that I don't see you addressing. How do you expect to get a number back from randno? You aren't sending one back. Is randno a library function, or have you implemented it somewhere.
Have you programmed in a higher level language, or is assembler your first step? Have you studied the basic working of microprocessors? It's difficult to address an issue if one doesn't know whether to look for improper syntax or improper understanding of the process.
Last edited by DaWei; 19May2007 at 23:08..