Sorting Method in ASM

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
user_3700486
Level 1
Level 1

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?

C code

1.PNG

ASM Code

3.PNG

Subroutine.h

2.PNG

0 Likes
1 Solution
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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;

Bob

View solution in original post

0 Likes
1 Reply
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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;

Bob

0 Likes