]> 4ch.mooo.com Git - plz.git/commitdiff
no idea... how to link assembly objects to C objects
authorsparky4 <sparky4@cock.li>
Wed, 3 Aug 2016 17:22:01 +0000 (12:22 -0500)
committersparky4 <sparky4@cock.li>
Wed, 3 Aug 2016 17:22:01 +0000 (12:22 -0500)
asmyt.o
common.h
copper.lib [new file with mode: 0755]
copper.o
makefile
plz.c
plz.o
plzpart.c
plzpart.exe [deleted file]
plzpart.map
plzpart.o

diff --git a/asmyt.o b/asmyt.o
index 89ab703d20f7a9af3eaa93d0dc3275ff4ea051da..cd83b690f240b52d366420913d7c6c38b3add73a 100755 (executable)
Binary files a/asmyt.o and b/asmyt.o differ
index 1ddb500816219431c6919f74304c8e040827941f..a3fc10d12be1decb54bbe46c1cb3098442c29ce7 100755 (executable)
--- 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 (executable)
index 0000000..74a7241
Binary files /dev/null and b/copper.lib differ
index 08171ce55eff57e0f91122a6e0f9fecbfdea7e81..3b04337246cc1ed19ff9c863818d8e2e3ac0f601 100755 (executable)
Binary files a/copper.o and b/copper.o differ
index 326bfc7fec304021e8ca0df04696d6c0e7be138e..adb65af53ff671bf30c1aa51af78156b0fb8fe76 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -62,7 +62,7 @@ FLAGS=$(CFLAGS) $(OFLAGS) $(DFLAGS) $(ZFLAGS)
 \r
 \r
 EXEC = plzpart.exe\r
-OBJS = copper.$(OBJ) tweak.$(OBJ) plz.$(OBJ) asmyt.$(OBJ)\r
+OBJS = copper.lib tweak.$(OBJ) plz.$(OBJ) asmyt.$(OBJ)\r
 \r
 all: $(EXEC)\r
 \r
@@ -76,21 +76,24 @@ plzpart.exe: plzpart.$(OBJ) $(OBJS)
 #\r
 #executable's objects\r
 #\r
-plzpart.$(OBJ): plzpart.h plzpart.c copper.o\r
-       wcl $(FLAGS) -c plzpart.c copper.o\r
+plzpart.$(OBJ): plzpart.h plzpart.c\r
+       wcl $(FLAGS) -c plzpart.c\r
 \r
 #\r
 #non executable objects libraries\r
 #\r
-plz.$(OBJ): plz.h plz.c\r
-       wcl $(FLAGS) -c plz.c\r
+plz.$(OBJ): plz.h plz.c copper.lib\r
+       wcl $(FLAGS) -c plz.c copper.lib\r
 tweak.$(OBJ): tweak.h tweak.c\r
        wcl $(FLAGS) -c tweak.c\r
 asmyt.$(OBJ): asmyt.h asmyt.c\r
        wcl $(FLAGS) -c asmyt.c\r
-copper.$(OBJ): copper.h copper.c copper.asm\r
+copper.lib: copper.$(OBJ)\r
+       wlib -b copper.lib copper.$(OBJ)\r
+copper.$(OBJ): copper.h copper.c copper.as0\r
 #      wcl $(AFLAGS) -zcm=tasm -c copper.asm\r
-       wcl $(FLAGS) -c copper.c\r
+       wasm $(AFLAGS) -c copper.as0\r
+#      wcl $(FLAGS) -c copper.c\r
 \r
 #tasm compiled...\r
 # copper.$(OBJ): copper.h copper.asm\r
@@ -104,6 +107,8 @@ copper.$(OBJ): copper.h copper.c copper.asm
 #other~\r
 #\r
 clean: .symbolic\r
+       @$(REMOVECOMMAND) copper.lib\r
+       @wlib -n copper.lib\r
        @$(REMOVECOMMAND) $(EXEC)\r
 #      @$(REMOVECOMMAND) *.$(OBJ)\r
        @$(REMOVECOMMAND) *.o\r
diff --git a/plz.c b/plz.c
index c9ef7fed8a91e66454e2d238aa47ece3052e6e3c..8925a9a9e9e88b9c6ea2230ffc925facc3bd2131 100755 (executable)
--- a/plz.c
+++ b/plz.c
@@ -183,7 +183,7 @@ void init_plz()
        tw_opengraph2();\r
        cop_start=96*(682-400);\r
        set_plzstart(60);\r
-       init_copper();\r
+//++++ init_copper();\r
        for(a=0;a<256;a++) tw_setrgbpalette(a,63,63,63);\r
 \r
 //     RGB\r
diff --git a/plz.o b/plz.o
index d0d931f5ab1c16186cdc4b82506e2b585725daf6..c4832a065c0887f8b9486c1ec9b23ede726d5555 100755 (executable)
Binary files a/plz.o and b/plz.o differ
index 68036a5804a090afded556a90445ad7419bca387..0f79e63eae817fa6256548b92bc8c3baa8732791 100755 (executable)
--- a/plzpart.c
+++ b/plzpart.c
@@ -5,9 +5,9 @@
 \r
 void main()  {\r
 //     dis_partstart();\r
-       //init_copper();\r
+       init_copper();\r
 //     initvect();\r
        plz();\r
 //     vect();\r
-       //close_copper();\r
+       close_copper();\r
        }\r
diff --git a/plzpart.exe b/plzpart.exe
deleted file mode 100755 (executable)
index 19b2110..0000000
Binary files a/plzpart.exe and /dev/null differ
index 79b86c2bd5710f67a9a846653a1ee4f8db44b53d..75cb3af00753b94896125223445a3bf063e920a8 100755 (executable)
@@ -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
index 271549ebcb3b79eb2e136c82eb0ad69497ba1fb4..d3ac3c40ae001333a9c2e759095e2b99cbb9ad1a 100755 (executable)
Binary files a/plzpart.o and b/plzpart.o differ