From: sparky4 Date: Wed, 3 Aug 2016 17:22:01 +0000 (-0500) Subject: no idea... how to link assembly objects to C objects X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=6b62c69b86735c7ad3917edabb1b0f6095c7ebad;p=plz.git no idea... how to link assembly objects to C objects --- diff --git a/asmyt.o b/asmyt.o index 89ab703..cd83b69 100755 Binary files a/asmyt.o and b/asmyt.o differ diff --git a/common.h b/common.h index 1ddb500..a3fc10d 100755 --- a/common.h +++ b/common.h @@ -27,9 +27,6 @@ void psini_write8(int, uint8_t); // void vga_upload_palette(uint8_t *); void initvect(void); - -int init_copper(void); -int close_copper(void); void copper1(void); void copper2(void); #endif diff --git a/copper.lib b/copper.lib new file mode 100755 index 0000000..74a7241 Binary files /dev/null and b/copper.lib differ diff --git a/copper.o b/copper.o index 08171ce..3b04337 100755 Binary files a/copper.o and b/copper.o differ diff --git a/makefile b/makefile index 326bfc7..adb65af 100755 --- a/makefile +++ b/makefile @@ -62,7 +62,7 @@ FLAGS=$(CFLAGS) $(OFLAGS) $(DFLAGS) $(ZFLAGS) EXEC = plzpart.exe -OBJS = copper.$(OBJ) tweak.$(OBJ) plz.$(OBJ) asmyt.$(OBJ) +OBJS = copper.lib tweak.$(OBJ) plz.$(OBJ) asmyt.$(OBJ) all: $(EXEC) @@ -76,21 +76,24 @@ plzpart.exe: plzpart.$(OBJ) $(OBJS) # #executable's objects # -plzpart.$(OBJ): plzpart.h plzpart.c copper.o - wcl $(FLAGS) -c plzpart.c copper.o +plzpart.$(OBJ): plzpart.h plzpart.c + wcl $(FLAGS) -c plzpart.c # #non executable objects libraries # -plz.$(OBJ): plz.h plz.c - wcl $(FLAGS) -c plz.c +plz.$(OBJ): plz.h plz.c copper.lib + wcl $(FLAGS) -c plz.c copper.lib tweak.$(OBJ): tweak.h tweak.c wcl $(FLAGS) -c tweak.c asmyt.$(OBJ): asmyt.h asmyt.c wcl $(FLAGS) -c asmyt.c -copper.$(OBJ): copper.h copper.c copper.asm +copper.lib: copper.$(OBJ) + wlib -b copper.lib copper.$(OBJ) +copper.$(OBJ): copper.h copper.c copper.as0 # wcl $(AFLAGS) -zcm=tasm -c copper.asm - wcl $(FLAGS) -c copper.c + wasm $(AFLAGS) -c copper.as0 +# wcl $(FLAGS) -c copper.c #tasm compiled... # copper.$(OBJ): copper.h copper.asm @@ -104,6 +107,8 @@ copper.$(OBJ): copper.h copper.c copper.asm #other~ # clean: .symbolic + @$(REMOVECOMMAND) copper.lib + @wlib -n copper.lib @$(REMOVECOMMAND) $(EXEC) # @$(REMOVECOMMAND) *.$(OBJ) @$(REMOVECOMMAND) *.o diff --git a/plz.c b/plz.c index c9ef7fe..8925a9a 100755 --- a/plz.c +++ b/plz.c @@ -183,7 +183,7 @@ void init_plz() tw_opengraph2(); cop_start=96*(682-400); set_plzstart(60); - init_copper(); +//++++ init_copper(); for(a=0;a<256;a++) tw_setrgbpalette(a,63,63,63); // RGB diff --git a/plz.o b/plz.o index d0d931f..c4832a0 100755 Binary files a/plz.o and b/plz.o differ diff --git a/plzpart.c b/plzpart.c index 68036a5..0f79e63 100755 --- a/plzpart.c +++ b/plzpart.c @@ -5,9 +5,9 @@ void main() { // dis_partstart(); - //init_copper(); + init_copper(); // initvect(); plz(); // vect(); - //close_copper(); + close_copper(); } diff --git a/plzpart.exe b/plzpart.exe deleted file mode 100755 index 19b2110..0000000 Binary files a/plzpart.exe and /dev/null differ diff --git a/plzpart.map b/plzpart.map index 79b86c2..75cb3af 100755 --- a/plzpart.map +++ b/plzpart.map @@ -1,9 +1,12 @@ Open Watcom Linker Version 2.0 beta Feb 1 2016 01:01:49 (32-bit) Copyright (c) 2002-2016 The Open Watcom Contributors. All Rights Reserved. Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved. -Created on: 16/08/03 12:01:20 +Created on: 16/08/03 12:21:41 +Warning! W1027: file copper.lib(/dos/z/plz/copper.as0): redefinition of _frame_count ignored Executable Image: plzpart.exe creating a DOS executable +Error! E2028: init_copper_ is an undefined reference +Error! E2028: close_copper_ is an undefined reference +------------+ @@ -13,7 +16,7 @@ creating a DOS executable Group Address Size ===== ======= ==== -DGROUP 0122:0000 0000add0 +DGROUP 01b0:0000 0000aa40 @@ -24,29 +27,28 @@ DGROUP 0122:0000 0000add0 Segment Class Group Address Size ======= ===== ===== ======= ==== -plzpart_TEXT CODE AUTO 0000:0000 00000016 -copper_TEXT CODE AUTO 0000:0020 000000ae -tweak_TEXT CODE AUTO 0000:00d0 0000006d -plz_TEXT CODE AUTO 0000:0140 00000a2a -asmyt_TEXT CODE AUTO 0000:0b70 000001ef -_TEXT CODE AUTO 0000:0d60 000004ae -copper13_DATA FAR_DATA AUTO 0121:0000 00000006 -FAR_DATA FAR_DATA AUTO 0121:0006 00000000 -_NULL BEGDATA DGROUP 0122:0000 00000020 -_AFTERNULL BEGDATA DGROUP 0124:0000 00000002 -CONST DATA DGROUP 0124:0002 00000000 -CONST2 DATA DGROUP 0124:0002 00000000 -_DATA DATA DGROUP 0124:0002 000002c0 -XIB DATA DGROUP 0150:0002 00000000 -XI DATA DGROUP 0150:0002 00000006 -XIE DATA DGROUP 0150:0008 00000000 -YIB DATA DGROUP 0150:0008 00000000 -YI DATA DGROUP 0150:0008 00000000 -YIE DATA DGROUP 0150:0008 00000000 -STRINGS DATA DGROUP 0150:0008 00000000 -DATA DATA DGROUP 0150:0008 00000000 -_BSS BSS DGROUP 0151:0000 00002adc -STACK STACK DGROUP 03ff:0000 00008000 +plzpart_TEXT CODE AUTO 0000:0000 00000020 +tweak_TEXT CODE AUTO 0000:0020 0000006d +plz_TEXT CODE AUTO 0000:0090 00000a26 +asmyt_TEXT CODE AUTO 0000:0ac0 000001ef +_TEXT CODE AUTO 0000:0cb0 000004ae +copper_TEXT CODE AUTO 0000:115e 00000997 +FAR_DATA FAR_DATA AUTO 01af:0005 00000000 +_NULL BEGDATA DGROUP 01b0:0000 00000020 +_AFTERNULL BEGDATA DGROUP 01b2:0000 00000002 +CONST DATA DGROUP 01b2:0002 00000000 +CONST2 DATA DGROUP 01b2:0002 00000000 +_DATA DATA DGROUP 01b2:0002 000002c0 +XIB DATA DGROUP 01de:0002 00000000 +XI DATA DGROUP 01de:0002 00000006 +XIE DATA DGROUP 01de:0008 00000000 +YIB DATA DGROUP 01de:0008 00000000 +YI DATA DGROUP 01de:0008 00000000 +YIE DATA DGROUP 01de:0008 00000000 +STRINGS DATA DGROUP 01de:0008 00000000 +DATA DATA DGROUP 01de:0008 00000000 +_BSS BSS DGROUP 01de:0008 00002750 +STACK STACK DGROUP 0454:0000 00008000 +----------------+ @@ -61,137 +63,143 @@ Address Symbol Module: plzpart.o(/dos/z/plz/plzpart.c) 0000:0000 main_ -Module: copper.o(/dos/z/plz/copper.c) -0122:02f0 _fadepal -0122:05f0 _cop_fadepal -0000:0020 init_copper_ -0000:0086* close_copper_ -0122:0678* _cop_pal -0121:0000 _cop_plz -0121:0002 _cop_drop -0121:0004 _cop_start Module: tweak.o(/dos/z/plz/tweak.c) -0000:00d0 tw_opengraph2_ -0000:0118 tw_setrgbpalette_ +0000:0020 tw_opengraph2_ +0000:0068 tw_setrgbpalette_ Module: plz.o(/dos/z/plz/plz.c) -0000:0140 plz_ -0000:0402+ init_plz_ -0122:0022+ _ptau -0122:0122+ _curpal -0122:0124* _timetable -0122:0138+ _ttptr -0122:013a+ _l1 -0122:013c+ _l2 -0122:013e+ _l3 -0122:0140+ _l4 -0122:0142+ _k1 -0122:0144+ _k2 -0122:0146+ _k3 -0122:0148+ _k4 -0122:014a+ _il1 -0122:014c+ _il2 -0122:014e+ _il3 -0122:0150+ _il4 -0122:0152+ _ik1 -0122:0154+ _ik2 -0122:0156+ _ik3 -0122:0158+ _ik4 -0122:015a+ _inittable -0122:067c+ _pals -0122:2a7c+ _frame_count +0000:0090 plz_ +0000:0352+ init_plz_ +01b0:0022+ _ptau +01b0:0122+ _curpal +01b0:0124* _timetable +01b0:0138+ _ttptr +01b0:013a _l1 +01b0:013c _l2 +01b0:013e _l3 +01b0:0140 _l4 +01b0:0142 _k1 +01b0:0144 _k2 +01b0:0146 _k3 +01b0:0148 _k4 +01b0:014a _il1 +01b0:014c _il2 +01b0:014e _il3 +01b0:0150 _il4 +01b0:0152 _ik1 +01b0:0154 _ik2 +01b0:0156 _ik3 +01b0:0158 _ik4 +01b0:015a+ _inittable +01b0:02e8+ _pals +01b0:26e8+ _frame_count Module: asmyt.o(/dos/z/plz/asmyt.c) -0000:0b70 plzline_ -0000:0bea setplzparas_ -0000:0d1e set_plzstart_ +0000:0ac0 plzline_ +0000:0b3a setplzparas_ +0000:0c6e set_plzstart_ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(stk086.asm) -0000:0d65 __STK -0000:0d85* __STKOVERFLOW_ +0000:0cb5 __STK +0000:0cd5* __STKOVERFLOW_ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(cstart) -0122:0000* __nullarea -0122:02a4* __ovlflag -0122:02a5* __intno -0122:02a6* __ovlvec -0000:0da2 _cstart_ -0000:0e75* _Not_Enough_Memory_ -0000:0fa7 __exit_ -0000:0fc4 __do_exit_with_msg__ -0000:101d __GETDS +01b0:0000* __nullarea +01b0:02a4* __ovlflag +01b0:02a5* __intno +01b0:02a6* __ovlvec +0000:0cf2 _cstart_ +0000:0dc5* _Not_Enough_Memory_ +0000:0ef7 __exit_ +0000:0f14 __do_exit_with_msg__ +0000:0f6d __GETDS Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(cmodel.asm) -0000:1028 _big_code_ -0000:1028* CodeModelMismatch -Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(pia.asm) -0000:102f __PIA -0000:1028* __PIS +0000:0f78 _big_code_ +0000:0f78* CodeModelMismatch +Module: copper.lib(/dos/z/plz/copper.as0) +0000:1160 _cop_drop +0000:1162* _cop_pal +0000:1166* _do_pal +0000:1168 _cop_start +0000:116a* _cop_scrl +0000:116c _cop_plz +0000:116e* _close_copper +0000:1199* _init_copper +0000:1239* _pompota +0000:1267* _moveplz +0000:1341 _fadepal +0000:1941 _cop_fadepal Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(i4m.asm) -0000:1046 __I4M -0000:1046* __U4M +0000:0f78 __I4M +0000:0f78* __U4M +Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(pia.asm) +0000:0f97 __PIA +0000:0f90* __PIS Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(kbhit.c) -0000:105e kbhit_ +0000:0fae kbhit_ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(xmsg.c) -0000:1075* __exit_with_msg_ -0000:107a __fatal_runtime_error_ +0000:0fc5* __exit_with_msg_ +0000:0fca __fatal_runtime_error_ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(crwdata) -0122:02aa __curbrk -0122:02b2 __STACKLOW -0122:02b4 __STACKTOP -0122:02b6 __cbyte -0122:02b8 __child -0122:02ba __no87 -0122:02c7 ___FPE_handler -0122:02ac __psp -0122:02bb __get_ovl_stack -0122:02bf __restore_ovl_stack -0122:02c3 __close_ovl_file -0122:02cb __LpCmdLine -0122:02cf __LpPgmName -0122:02ae __osmajor -0122:02af __osminor -0122:02b0 __osmode -0122:02b1 __HShift +01b0:02aa __curbrk +01b0:02b2 __STACKLOW +01b0:02b4 __STACKTOP +01b0:02b6 __cbyte +01b0:02b8 __child +01b0:02ba __no87 +01b0:02c7 ___FPE_handler +01b0:02ac __psp +01b0:02bb __get_ovl_stack +01b0:02bf __restore_ovl_stack +01b0:02c3 __close_ovl_file +01b0:02cb __LpCmdLine +01b0:02cf __LpPgmName +01b0:02ae __osmajor +01b0:02af __osminor +01b0:02b0 __osmode +01b0:02b1 __HShift Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(cmain086.c) -0000:1094 __CMain +0000:0fe4 __CMain Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(initrtns.c) -0000:10f5 __InitRtns -0000:10f5* __FInitRtns -0000:1150 __FiniRtns -0000:1150* __FFiniRtns +0000:1045 __InitRtns +0000:1045* __FInitRtns +0000:10a0 __FiniRtns +0000:10a0* __FFiniRtns Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(uselfn.c) -0122:02d4 ___uselfn +01b0:02d4 ___uselfn Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(dosseg) -0000:11b4 __DOSseg__ +0000:1104 __DOSseg__ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(enterdb.c) -0000:11b5 __EnterWVIDEO_ -0122:02d6+ ___WD_Present +0000:1105 __EnterWVIDEO_ +01b0:02d6+ ___WD_Present Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(___argc.c) -0122:2dc6 ____Argv -0122:2dca ____Argc +01b0:2a32 ____Argv +01b0:2a36 ____Argc Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(amblksiz.c) -0122:02d8 __amblksiz +01b0:02d8 __amblksiz Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(exit.c) -0000:11d9+ __null_int23_exit_ -0000:11da exit_ -0000:11f2* _exit_ -0122:02da+ ___int23_exit -0122:02de+ ___FPE_handler_exit +0000:1129+ __null_int23_exit_ +0000:112a exit_ +0000:1142* _exit_ +01b0:02da+ ___int23_exit +01b0:02de+ ___FPE_handler_exit Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(sgdef086) -0122:02e2 __Start_XI -0122:02e8 __End_XI -0122:02e8 __Start_YI -0122:02e8 __End_YI +01b0:02e2 __Start_XI +01b0:02e8 __End_XI +01b0:02e8 __Start_YI +01b0:02e8 __End_YI + + + +---------------------------+ + | Unresolved References | + +---------------------------+ + +Undefined Symbol Referenced by +================ ============= + +init_copper_ plzpart.o(/dos/z/plz/plzpart.c) +close_copper_ plzpart.o(/dos/z/plz/plzpart.c) +--------------------+ | Libraries Used | +--------------------+ +copper.lib /dos/fdos/watcom2/lib286/dos/clibh.lib - - - +-----------------------+ - | Linker Statistics | - +-----------------------+ - -Stack size: 8000 (32768.) -Memory size: bff0 (49136.) -Entry point address: 0000:0da2 -Link time: 00:00.00 diff --git a/plzpart.o b/plzpart.o index 271549e..d3ac3c4 100755 Binary files a/plzpart.o and b/plzpart.o differ