Posts: 720
Threads: 46
Joined: Oct 2001
Quote:Code:
.model medium, basic
.386
.code
ScreenBlit proc public uses di si ds es,\
pdst:far ptr, psrc:far ptr
lds si, psrc
les di, pdst
mov cx, 16000
rep movsd
ret
ScreenBlit endp
end
Hmm. I'm having trouble implementing this code. I don't understand what lds and les are doing, and I'm getting a syntax error on movsd. Here's what I have:
Code:
procedure ScreenBlt(var source, destination :buffertype); assembler;
asm
push ds
lds si, source
les di, destination
mov cx, 1600
rep movsd
ret
pop ds
end;
Posts: 6,419
Threads: 74
Joined: Mar 2002
Makes DS:SI == ADDRESS (segment, offset).
Makes ES
I == ADDRESS (segment, offset).
Posts: 3,288
Threads: 167
Joined: Nov 2001
Wiz, Just take your old BlitScreen and change:
Mov cx,32000
Rep Movsw
To Mov Cx,1600
Rep Movsd
And it should work.
Posts: 720
Threads: 46
Joined: Oct 2001
Quote:Rep Movsd
This line still causes a syntax error. I assume that what you're doing is moving around Doubles instead of Words, since its fewer overall operations... Is there some compiler tag that I should be using?
Posts: 6,419
Threads: 74
Joined: Mar 2002
That instruction moves a double word (32 bits), and it is only available on 386s or above. Use .386 in your assembler
Posts: 720
Threads: 46
Joined: Oct 2001
Quote:That instruction moves a double word (32 bits), and it is only available on 386s or above. Use .386 in your assembler
Ugh. TP7 doesn't support some 8087 instructions.
Posts: 3,288
Threads: 167
Joined: Nov 2001
is there some metacommands to enable 386+ ints? sumthing like
{+386} at the top of yer proggie.
Posts: 720
Threads: 46
Joined: Oct 2001
Quote:is there some metacommands to enable 386+ ints? sumthing like
{+386} at the top of yer proggie.
I don't think so. The support for TP is very poor on the net, but what little I've gleaned from other message boards has indicated that the BASM doesn't support .386 commands. (some of them, anyways)
Posts: 3,288
Threads: 167
Joined: Nov 2001