I am currently working on a project that consists of a sorting by the bubble method, an initial array is given, the final arrany that is the one that has to be printed on the LCD, and the number of elements of the array. The project it is initially in C and a subroutine in ASM is elaborated. At the moment of executing the code, nothing appears on the LCD, only the initial array. Could you help me find the error on the sorting method or the C call?
You are passing NElements as a character which will be interpreted in your subroutine as 0x35. Accessing and changing the data will destroy ram contents.
Use char NElements = 5;