>Hi
>
>Yes i take out the first Function line and save as showser.prg
>i run it as do showser with 'C' and got 2020-2020. I put a
>? mp inside the code and i got a HEART simbol and the
>32
>32
>32
>32
>Disk serial number:is 2020-2020
>
>Is the output from serial.bin on the same MP string??
>
>Is there a way i can check serial.bin is runing ok?
>
>Thank
Run this code to verify correct bytes exist :
lcSerialBin = 'serial.bin'
x=0
handle=fopen(lcSerialBin)
do while !feof(handle)
? asc(fread(handle,1))
x=x+1
enddo
=fclose(handle)
? x
The values you get should be :
83
184
0
105
139
211
139
31
205
33
91
203
To test if it's working right you need to use debug.exe (when you're unsure what you're doing enter q at prompt to exit) :
debug.exe (You'd get a - prompt). Enter these :
-a100 (You'd get a line with addresses at left, second should read 0100)
mov ax,6900
mov bx,0003
mov dx,0800
int 21
[enter] to get the - prompt again.
-g10B
-des:0800
You should see serial number starting from 3rd byte and also volume label + fat32 (For C drive-mov bx,0003 specifies we want it for 3rd drive).
-q (Exit debugger)
Also check serial.bin content. Go to its dir and run debug again :
debug serial.bin
-u100
You should see :
push bx
mov ax,6900
mov dx,bx
mov bx,[bx]
int 21
pop bx
retf
If not you could enter these as in above sample starting with a100. Then :
-w 100 (it would say writing out 0c bytes)
-q (exit)
Yes mp on return has all the return info. On call we put drive number there as :
(For C drive)
chr(3)+chr(0)+space(22)
On return after first 2 bytes is result. When you print it directly you should see volume label and FAT32.
PS: Don't ask me why 'mp' as varname. I wrote it too many years ago :)
Cetin