Dim word1 As Long
Dim word2 As Long
Dim byte1 As Byte @ 0x60
Dim byte2 As Byte @ 0x61
Dim byte3 As Byte @ 0x62
Dim byte4 As Byte @ 0x63
'test values in decimal and hex from convert utility
fout = 243954128 '= 4d 68 a7 1d
'1 = 3f 80 00 00
'10 = 41 20 00 00
'100 = 42 c8 00 00
'1000= 44 7a 00 00
'10,000= 46 1c 40 00
'100,000= 47 c3 50 00
'1,000,000=49 74 24 00
'10,000,000= 4b 18 96 80
'100,000,000=4c be bc 20
'243954128 = on the Z80 IEEE 754 converter = 4D 68 A7 1D
'243954128 = hex On a calculator = E8A71D0... NOTE No SIGN Bit!!!
'Adding the SIGN Bit gives = 4D 68 A7 1D
'0100,,1101,,0110,,1000,,1010,,0111,,0001,,1101
'So the above agree
'But
'243954128 =on Watch Window = 9A 68 A7 1D
'As Bit Pattern =1 001,,1010,,0110,,1000,,1010,,0111,,0001,,1101
'as Hex= ..................9A.......68......A7...1D
'1001,,1010,,,,,,,0110,,1000,,1010,,0111,,0001,,1101
'first Byte appears incorrect.???
loop1:
fout = 243954128
word1 = fout.HW
word2 = fout.LW
byte1 = word1.HB
byte2 = word1.LB
byte3 = word2.HB
byte4 = word2.LB
Goto loop1