Advertisement

Using arrays in inline ASM for C/C++ (DOS !!)

Started by May 24, 2001 10:17 AM
-1 comments, last by MainForze 23 years, 8 months ago
Hi there, I''m trying to code some sort of ScrollUp() function in TC++ 3 for DOS. The start of the function should go something like this: void ScrollUp() { unsigned char ScanLine[320]; asm{ mov ax, 0xa000 mov es, ax xor bx, bx Loop1: mov al, es:[bx] mov ScanLine[bx], al inc bx cmp bx, 320 jb Loop1 . . . . . } } This part tries to load the ScanLine array with the first line of mode13h, to put it at the bottom line once the scrolling is done. However, it isn''t possible to reference an array in inline asm the way I tried. So how SHOULD I do it?? Please help !!! Thanks in advance, MainForze
"It's strange, isn't it? You stand in the middle of a library and go 'AAAAAAAGGHHHH' and everyone just stares at you. But you do the same thing on an airplane, and everyone joins in!"

This topic is closed to new replies.

Advertisement