Error C2432 illegal reference to 16-bit data in 'second operand' of __asm
问题 In Visual Studio, I get this error when I compile my __asm in C. Does anybody know what is wrong with this code? I tried everything, but nothing works. I am trying to implement the bubble sort in assembly. unsigned short i = 0; unsigned short j = 0; unsigned short max = short(N-2); unsigned short tab[5]; tab[0] = 54; tab[1] = 123; tab[2] = 342; tab[3] = 5436; tab[4] = 1234; unsigned short a = 0; __asm { loop1: inc i mov j, 0 mov si, tab loop2: mov ax, [si] // <- Error C2432 on this line mov a