Sorry if this has been mentioned somewhere else but I don't pay much attention to FB (I should though...)
I am in console mode and using only PRINT (so no libraries) and I am wondering how to give it vertical retrace. WAIT no longer exists. Thanks
OK I got
Code:
E:\freeBASIC>fbc mine/moo.bas
mine/moo.asm: Assembler messages:
mine/moo.asm:26: Error: junk `e' after expression
when I ran
Code:
asm
mov dx, 3dah
vretrace_loop:
in al, dx
test al, 8
jz vretrace_loop
end asm
=|
I got the asm from
http://www.compuphase.com/vretrace.htm#BASIC
the asm file snippet
Code:
# asm
# mov dx, 3dah
mov dx , 3e ah <--------- LINE 26
# vretrace_loop:
vretrace_loop :
# in al, dx
in al , dx
# test al, 8
test al , 8
# jz vretrace_loop
jz vretrace_loop
# end asm
#
FB follows the GAS syntax in assembly coding.
So either convert your hex val to decimal or use 0x3da
Quote:Code:
asm
mov dx, 3dah
vretrace_loop:
in al, dx
test al, 8
jz vretrace_loop
end asm
OT: Isn't that the standard VSync code for MSDOS? I mean, the above does exactly "WAIT &H3DA, 8".
Rel: Now it compiles bit it's stuck in loop. =/
Nath: *Looks at WAIT and at ASM* Looks like it. But I've never used ASM before in my life =/
Is it stuck becuase, like nath said, this is code for MSDOS? If so I still need help getting vertical retrace in windows.
Umm...we are in 32-bit with FB. You are using code for MS-DOS. It's like trying to program for linux under 32-bit. You have to use code for a windows API.
Check a C reference, then covert the code. It should be easy enough to covert at face value.
I know FB is 32bit. And I also know I know nothing about what you are talking about (besides the point that it's not DOS compatible). Actually I don't really need it >_> thanks anyways. =P