www.digitalmars.com         C & C++   DMDScript  

c++.dos.16-bits - Explicit cast to convert

Hi All,
I am having some issues trying to compile a program that i am
writing to read sectors from a floppy disk. The program is partly
written in C and partly in assembly language but I am having
issues with the C when trying to reference to a memory location.
When i try to output the characters located at the pointer it
kicks up an error: need explicit cast to convert fot function
parameter 1 to get from int * to int. I believe this is an issue
with C/C++ restricting the functions available that i need to use
because they may be dangerous. I am compiling using the parameters
dmc filename -msd and have attached my code in case you might be
able to help.
Many thanks,
dinklebaga
begin 644 rsec.exe


MAOK]``"X9`!0N6 `4>A !HF&_OVX9`!0N' `4.A1!HF&_/VX`!")AN[]B<.*
M#S#MB8[Z_5"XA`!0Z)8$_[;N_;B6`%#HBP3_MN
MMN[]Z-X% \0:QX;V_0``BX;V_3N&\OU]&?^V_OV+GN[]B <PY%#H^P2#Q`3_
MAO;]Z]V[`!".P[L``+0"L`&U`;$!M &R`,T3QX;V_0``BX;R_?>N]/T[AO;]
M?AG_MOS]BY[N_8H',.10Z+ $ \0$_X;V_>O9_[;^_> .!/^V_/WH!P2XN !0
MZ.X#N,8`4.CG`[C&`%#HX`,QP(OE7<-5B^RT!+`!BD8$B,6Q`8I&!HC&BD8(

MZ9(`N.(`4.B-`X/$`NF%`+CZ`%#H `.#Q`+K>; 0`5#H=`.#Q`+K;; B`5#H
M:`.#Q`+K8; P`5#H7`.#Q`+K5;A&`5#H4`.#Q`+K2;A4`5#H1`.#Q`+K/;AN
M`5#H.`.#Q`+K,;B$`5#H+`.#Q`+K);B0`5#H(`.#Q`+K&;BD`5#H%`.#Q`+K

M`'5HQD;\`(!^_`)]68-^^ !U4XI&_9A0B4;VBD;\F%"Y]`%1B4;XZ+D"BD;^

M_C'`B^5=P_Y&_.NA_D;]ZXPQP(A&_(K(B$[]BD;^F%"*1OR84(G(F%#H<?V)
M1OJ#Q`:%P'0<BD;]F%"*1OR84+ X`E#H0 +_=OKH OZ#Q`CK"KA<`E#H
MQ`(QP(OE7<,`NGX#Z1L
M)HL>` `K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=H="`H0RD 

M9'5M<'!R978N='AT`&AE>&1U;7`N='AT``IM96US96-T<'1R(#T )6,*`&UE
M;7-E8W1P='( /2`E>`H``&UE;7-E8W1P='( /2`E9`H```IR96%C:&EN9PH`
M`')E86-H:6YG" !);G9A;&ED($-O;6UA;F0*``!!9&1R97-S($UA<FL 3F]T
M($9O=6YD" !$:7-K(%=R:71E(%!R;W1E8W1E9`H`4V5C=&]R($YO="!&;W5N
M9`H`4F5S970 1F%I;&5D" !&;&]P<'D 1&ES:R!296UO=F5D" ``1$U!($]V
M97)R=6X*``!$34$ 0W)O<W-E9"`V-&L 0F]U;F1A<GD*`$UE9&EA(%1Y<&4 


M`"``0`"``%L!:`%U`8$!C0&9`:4!L0&]`<D!U0'A`>T!5F5R:69Y:6YG(&AE
M860 )60 8WEL:6YD97( )3`R9`T```I%<G)O<B!A="!H96%D("5D(&-Y;&EN
M9&5R("4P,F0 . `*17)R;W( 870 :&5A9"`E9"P 8WEL:6YD97( )3`R9"`Z
M```*3W!E<F%T:6]N(&-O;7!L971E9"!S=6-C97-S9G5L;'DN(%-E92!O=71P
M=70*````C`(`````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````T*3F]T(&5N;W5G:"!M96UO<GD-" `-"D)A9"!S=&%C:R!S:7IE



M;W5G:"!M96UO<GD-" `(````````````````````````````````````````

M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````

M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````!L"0$`````````````
M`````0````$````````````"``$``0````````````8`` `!````````````

M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````



M3$5?24Y&3ST```&FWP*AI02!GP3 _`A`? B`_````````&"">8*! IJ"3X)8
M  2A_ BA_ ```````,&CVJ/AH_JCL*.YHP2!_ A!6 AA> B!_L&CVJ/AH_JC



M`)8)`0"F"04``````$$`2&5A<"!I<R!C;W)R=7!T960V" ``````% `"``(`


M*"` ("` ("` ("` ("` ("` ($ 0$!`0$!`0$!`0$!`0$!"$A(2$A(2$A(2$
M$!`0$!`0$(&! 8&! 0$!`0$!`0$!`0$!`0$!`0$!`0$!$!`0$!`0 H*" H*"
M` ("` ("` ("` ("` ("` ("` (0$!`0(```````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M`````````````````````````+ .#AX`````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
/````````````````````
`
end
Feb 13 2009