HI,
A friend of mine has done a small routine with PROTON but I use PBP.
He send me ASM & BAS files.
This is a very short prog: (myvar.bas)
Dim freqlol As Byte
Dim freqloh As Byte
Dim freqhil As Byte
Dim freqhih As Byte
Dim freq As Dword
Dim frg As float
Dim frg2 As Dword
dim w1 As frg2.word1
dim w0 as frg2.word0
freq = 24000000
frg = freq / 931.322
frg2 = frg * 10000
freqlol = w0.byte0
freqloh = w0.byte1
freqhil = w1.byte0
freqhih = w1.byte1
This subroutine could help me to calc a value (32 bits and floating point) for "freq" (freq is not always 24000000 but to test my PBP prog this the test value)
My PBP test prog is:
Asm
include "myvar.INC"
Endasm
serout2 portb.0,84,["go",10,13]
serout2 portb.0,84,[dec FREQHIH" ",DEC freqhil," ",DEC freqloh," ",DEC freqlol]
end
Just to try if I can get the values I need for my DDS
"myvar.INC" is the asm prog done from my friend (myvar.asm renamed)
But when I try to compile, I have errors
someone can help ?
Harryweb
Bookmarks