12-08-2003, 10:28 PM
... could you help? I am writing this simple routine using Power Basic's inline assembly capabilities. It just blits a buffer to video memory (16 kb). For some reason, the program keeps crashing after some iterations. I'm sure that the problem is in this routine:
Thanks!
Code:
Sub Blit (BYVAL Ssegment AS WORD, BYVAL Soffset AS WORD) '(BYVAL var AS DWord)
' PB35 inline assembly ROCKS! (8086 only, but still...)
! push ds
! push es
! mov ax, Ssegment
! mov ds, ax
! mov si, SOffset
! mov ax, &hb800
! mov es, ax
! mov di, 0
! mov cx, 8192
! rep movsw
! pop es
! pop ds
End Sub
Thanks!