From: sparky4 Date: Wed, 11 May 2016 14:01:34 +0000 (-0500) Subject: .... X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=60fdc229c67a2a61315fe0c9631df551a058a1da;p=plz.git .... --- diff --git a/asmyt.c b/asmyt.c index aeee521..6cf2569 100755 --- a/asmyt.c +++ b/asmyt.c @@ -17,11 +17,11 @@ word anSelfModifyOffsets[5*84]; -int ccc; +//int ccc; -function lsini4_WriteWord(nIndex, nValue) +void lsini4_WriteWord(nIndex, nValue) { - var nByteOffset = lsini4_GetOffset() + (nIndex * 2); + word nByteOffset = lsini4_GetOffset() + (nIndex * 2); psini_WriteWord(nByteOffset, nValue); } @@ -139,7 +139,7 @@ int plzline(int y, int vseg) } */ -void setplzparas(int c1, int c2, int c3, int c4) +int setplzparas(int c1, int c2, int c3, int c4) { // static word psini; // static word lsini4; @@ -175,25 +175,26 @@ lsini16 WORD .LABEL word psiniOffset = 0; word lsini16Offset = lsini16_GetOffset(); word lsini4Offset = lsini4_GetOffset(); + word ccc; + word lc1, lc2, lc3, lc4; - for (var ccc = 0; ccc < 84; ccc++) + for (ccc=0; ccc < 84; ccc++) { - var lc1 = c1 + psiniOffset + (ccc * 8); + word lc1 = c1 + psiniOffset + (ccc * 8); lc1 &= 0xFFFF; anSelfModifyOffsets_WriteWord((1 * 84) + ccc, lc1); - var lc2 = (c2 * 2) + lsini16Offset - (ccc * 8) + (80 * 8); + lc2 = (c2 * 2) + lsini16Offset - (ccc * 8) + (80 * 8); lc2 &= 0xFFFF; anSelfModifyOffsets_WriteWord((2 * 84) + ccc, lc2); - var lc3 = c3 + psiniOffset - (ccc * 4) + (80 * 4); + lc3 = c3 + psiniOffset - (ccc * 4) + (80 * 4); lc3 &= 0xFFFF; anSelfModifyOffsets_WriteWord((3 * 84) + ccc, lc3); - var lc4 = (c4 * 2) + lsini4Offset + (ccc * 32); + lc4 = (c4 * 2) + lsini4Offset + (ccc * 32); lc4 &= 0xFFFF; anSelfModifyOffsets_WriteWord((4 * 84) + ccc, lc4); } - return 0; } diff --git a/asmyt.err b/asmyt.err index 209b101..e46f96a 100755 --- a/asmyt.err +++ b/asmyt.err @@ -1,11 +1 @@ -asmyt.c(151): Error! E1156: Assembler error: 'Syntax error' -asmyt.c(153): Error! E1156: Assembler error: 'A constant operand is expected in multiplication' -asmyt.c(154): Error! E1156: Assembler error: 'Operator is expected' -asmyt.c(157): Error! E1156: Assembler error: 'A constant operand is expected in multiplication' -asmyt.c(158): Error! E1156: Assembler error: 'Operator is expected' -asmyt.c(160): Error! E1156: Assembler error: 'A constant operand is expected in multiplication' -asmyt.c(161): Error! E1156: Assembler error: 'Operator is expected' -asmyt.c(164): Error! E1156: Assembler error: 'A constant operand is expected in multiplication' -asmyt.c(165): Error! E1156: Assembler error: 'Operator is expected' -asmyt.c(166): Error! E1156: Assembler error: 'Syntax error' -asmyt.c(168): Error! E1011: Symbol 'LABEL' has not been declared +asmyt.c(25): Warning! W131: No prototype found for function 'psini_WriteWord' diff --git a/asmyt.h b/asmyt.h index 74e66e9..2f6065a 100755 --- a/asmyt.h +++ b/asmyt.h @@ -6,4 +6,13 @@ void anSelfModifyOffsets_WriteWord(word nOffset, word nValue); int plzline(int y, int vseg); int setplzparas(int c1, int c2, int c3, int c4); word set_plzstart(word start); +inline word lsini16_GetOffset() +{ + return 16384 + (8192 * 2); +} + +inline word lsini4_GetOffset() +{ + return 16384; +} #endif diff --git a/copper.o b/copper.o index a1e4264..70852af 100755 Binary files a/copper.o and b/copper.o differ diff --git a/plz.h b/plz.h index 240bf1c..3bb077c 100755 --- a/plz.h +++ b/plz.h @@ -5,7 +5,7 @@ #include "copper.h" #include "tweak.h" #include "types.h" -extern setplzparas(); +extern int setplzparas(); extern int plzline(); extern int init_copper(); extern int close_copper(); diff --git a/plz.o b/plz.o index d953941..0e39801 100755 Binary files a/plz.o and b/plz.o differ diff --git a/plzpart.map b/plzpart.map index 7229ff6..ecc22d4 100755 --- a/plzpart.map +++ b/plzpart.map @@ -1,11 +1,11 @@ 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/02/17 10:22:35 +Created on: 16/05/11 09:00:38 Executable Image: plzpart.exe creating a DOS executable -Error! E2028: setplzparas_ is an undefined reference Error! E2028: plzline_ is an undefined reference +Error! E2028: psini_WriteWord_ is an undefined reference +------------+ @@ -15,7 +15,7 @@ Error! E2028: plzline_ is an undefined reference Group Address Size ===== ======= ==== -DGROUP 0393:0000 0000ae30 +DGROUP 03ab:0000 0000b170 @@ -30,28 +30,28 @@ plzpart_TEXT CODE AUTO 0000:0000 00000020 copper_TEXT CODE AUTO 0000:0020 000000d2 tweak_TEXT CODE AUTO 0000:0100 0000006d plz_TEXT CODE AUTO 0000:0170 00000a30 -asmyt_TEXT CODE AUTO 0000:0ba0 00000041 -_TEXT CODE AUTO 0000:0be2 00002d27 -copper13_DATA FAR_DATA AUTO 0391:0000 00000006 -plz13_DATA FAR_DATA AUTO 0391:0010 00000002 -FAR_DATA FAR_DATA AUTO 0392:0002 00000000 -_NULL BEGDATA DGROUP 0393:0000 00000020 -_AFTERNULL BEGDATA DGROUP 0395:0000 00000002 -CONST DATA DGROUP 0395:0002 00000022 -CONST2 DATA DGROUP 0397:0004 00000132 -_DATA DATA DGROUP 03aa:0006 000002f6 -XIB DATA DGROUP 03d9:000c 00000000 -XI DATA DGROUP 03d9:000c 00000018 -XIE DATA DGROUP 03db:0004 00000000 -YIB DATA DGROUP 03db:0004 00000000 -YI DATA DGROUP 03db:0004 00000000 -YIE DATA DGROUP 03db:0004 00000000 -STRINGS DATA DGROUP 03db:0004 00000000 -DATA DATA DGROUP 03db:0004 00000000 -_emu_init_start EMU DGROUP 03db:0004 00000000 -_emu_init_end EMU DGROUP 03db:0004 00000000 -_BSS BSS DGROUP 03dc:0000 00002998 -STACK STACK DGROUP 0676:0000 00008000 +asmyt_TEXT CODE AUTO 0000:0ba0 000001de +_TEXT CODE AUTO 0000:0d7e 00002d11 +copper13_DATA FAR_DATA AUTO 03a9:0000 00000006 +plz13_DATA FAR_DATA AUTO 03a9:0010 00000002 +FAR_DATA FAR_DATA AUTO 03aa:0002 00000000 +_NULL BEGDATA DGROUP 03ab:0000 00000020 +_AFTERNULL BEGDATA DGROUP 03ad:0000 00000002 +CONST DATA DGROUP 03ad:0002 00000022 +CONST2 DATA DGROUP 03af:0004 00000132 +_DATA DATA DGROUP 03c2:0006 000002f6 +XIB DATA DGROUP 03f1:000c 00000000 +XI DATA DGROUP 03f1:000c 00000018 +XIE DATA DGROUP 03f3:0004 00000000 +YIB DATA DGROUP 03f3:0004 00000000 +YI DATA DGROUP 03f3:0004 00000000 +YIE DATA DGROUP 03f3:0004 00000000 +STRINGS DATA DGROUP 03f3:0004 00000000 +DATA DATA DGROUP 03f3:0004 00000000 +_emu_init_start EMU DGROUP 03f3:0004 00000000 +_emu_init_end EMU DGROUP 03f3:0004 00000000 +_BSS BSS DGROUP 03f4:0000 00002ce0 +STACK STACK DGROUP 06c2:0000 00008000 +----------------+ @@ -69,113 +69,118 @@ Module: plzpart.o(/dos/z/plz/plzpart.c) Module: copper.o(/dos/z/plz/copper.c) 0000:0020 init_copper_ 0000:00aa close_copper_ -0393:0490 _fadepal -0393:0790 _cop_fadepal -0393:0794+ _dtau -0393:0818* _cop_pal -0391:0000 _cop_plz -0391:0002 _cop_drop -0391:0004 _cop_start +03ab:0490 _fadepal +03ab:0790 _cop_fadepal +03ab:0794+ _dtau +03ab:0818* _cop_pal +03a9:0000 _cop_plz +03a9:0002 _cop_drop +03a9:0004 _cop_start Module: tweak.o(/dos/z/plz/tweak.c) 0000:0100 tw_opengraph2_ 0000:0148 tw_setrgbpalette_ Module: plz.o(/dos/z/plz/plz.c) 0000:0170 plz_ 0000:0438+ init_plz_ -0393:0176+ _ptau -0393:0276+ _curpal -0393:0278* _timetable -0393:028c+ _ttptr -0393:028e+ _l1 -0393:0290+ _l2 -0393:0292+ _l3 -0393:0294+ _l4 -0393:0296+ _k1 -0393:0298+ _k2 -0393:029a+ _k3 -0393:029c+ _k4 -0393:029e+ _il1 -0393:02a0+ _il2 -0393:02a2+ _il3 -0393:02a4+ _il4 -0393:02a6+ _ik1 -0393:02a8+ _ik2 -0393:02aa+ _ik3 -0393:02ac+ _ik4 -0393:02ae+ _inittable -0393:081c+ _pals -0391:0010+ _frame_count +03ab:0176+ _ptau +03ab:0276+ _curpal +03ab:0278* _timetable +03ab:028c+ _ttptr +03ab:028e+ _l1 +03ab:0290+ _l2 +03ab:0292+ _l3 +03ab:0294+ _l4 +03ab:0296+ _k1 +03ab:0298+ _k2 +03ab:029a+ _k3 +03ab:029c+ _k4 +03ab:029e+ _il1 +03ab:02a0+ _il2 +03ab:02a2+ _il3 +03ab:02a4+ _il4 +03ab:02a6+ _ik1 +03ab:02a8+ _ik2 +03ab:02aa+ _ik3 +03ab:02ac+ _ik4 +03ab:02ae+ _inittable +03ab:081c+ _pals +03a9:0010+ _frame_count Module: asmyt.o(/dos/z/plz/asmyt.c) -0000:0ba0 set_plzstart_ +0000:0ba0* lsini4_WriteWord_ +0000:0bbe* lsini16_WriteWord_ +0000:0bdc* anSelfModifyOffsets_WriteWord_ +0000:0c16 set_plzstart_ +0000:0c58 setplzparas_ +03ab:2c1c+ _anSelfModifyOffsets Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(stk086.asm) -0000:0be7 __STK -0000:0c07* __STKOVERFLOW_ +0000:0d83 __STK +0000:0da3* __STKOVERFLOW_ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(cstart) -0393:0000* __nullarea -0393:0350* __ovlflag -0393:0351* __intno -0393:0352* __ovlvec -0000:0c24 _cstart_ -0000:0cf7* _Not_Enough_Memory_ -0000:0e29 __exit_ -0000:0e48 __do_exit_with_msg__ -0000:0ea5 __GETDS +03ab:0000* __nullarea +03ab:0350* __ovlflag +03ab:0351* __intno +03ab:0352* __ovlvec +0000:0dc0 _cstart_ +0000:0e93* _Not_Enough_Memory_ +0000:0fc5 __exit_ +0000:0fe2 __do_exit_with_msg__ +0000:103b __GETDS Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(cmodel.asm) -0000:0eb0 _big_code_ -0000:0eb0* CodeModelMismatch +0000:1046 _big_code_ +0000:1046* CodeModelMismatch Module: /dos/fdos/watcom2/lib286/math87h.lib(floor.c) -0000:0eb8 floor_ +0000:104e floor_ Module: /dos/fdos/watcom2/lib286/math87h.lib(fchop87.asm) -0000:0f0a __CHP +0000:10a0 __CHP Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(pia.asm) -0000:0f39 __PIA -0000:0f32* __PIS +0000:10cf __PIA +0000:10c8* __PIS Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(fltused.c) -0393:0356 _fltused_ +03ab:0356 _fltused_ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(_8087086.asm) -0393:0358 __8087 -0393:0359 __real87 -0393:035a __dos87emucall -0393:035c __dos87real +03ab:0358 __8087 +03ab:0359 __real87 +03ab:035a __dos87emucall +03ab:035c __dos87real Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(i4m.asm) -0000:0f50 __I4M -0000:0f50* __U4M +0000:10e6 __I4M +0000:10e6* __U4M Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(kbhit.c) -0000:0f68 kbhit_ +0000:10fe kbhit_ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(xmsg.c) -0000:0f7f* __exit_with_msg_ -0000:0f84 __fatal_runtime_error_ +0000:1115* __exit_with_msg_ +0000:111a __fatal_runtime_error_ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(crwdata) -0393:035e __curbrk -0393:0366 __STACKLOW -0393:0368 __STACKTOP -0393:036a __cbyte -0393:036c __child -0393:036e __no87 -0393:037b ___FPE_handler -0393:0360 __psp -0393:036f __get_ovl_stack -0393:0373 __restore_ovl_stack -0393:0377 __close_ovl_file -0393:037f __LpCmdLine -0393:0383 __LpPgmName -0393:0362 __osmajor -0393:0363 __osminor -0393:0364 __osmode -0393:0365 __HShift +03ab:035e __curbrk +03ab:0366 __STACKLOW +03ab:0368 __STACKTOP +03ab:036a __cbyte +03ab:036c __child +03ab:036e __no87 +03ab:037b ___FPE_handler +03ab:0360 __psp +03ab:036f __get_ovl_stack +03ab:0373 __restore_ovl_stack +03ab:0377 __close_ovl_file +03ab:037f __LpCmdLine +03ab:0383 __LpPgmName +03ab:0362 __osmajor +03ab:0363 __osminor +03ab:0364 __osmode +03ab:0365 __HShift Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(cmain086.c) -0000:0fa2 __CMain +0000:1134 __CMain Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(initrtns.c) -0000:1008 __InitRtns -0000:1008* __FInitRtns -0000:1063 __FiniRtns -0000:1063* __FFiniRtns +0000:1195 __InitRtns +0000:1195* __FInitRtns +0000:11f0 __FiniRtns +0000:11f0* __FFiniRtns Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(uselfn.c) -0393:0388 ___uselfn +03ab:0388 ___uselfn Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(dosseg) -0000:10c8 __DOSseg__ +0000:1254 __DOSseg__ Module: /dos/fdos/watcom2/lib286/math87h.lib(modf87.asm) -0000:10ca modf_ +0000:1256 modf_ Module: /dos/fdos/watcom2/lib286/noemu87.lib(emustub.asm) 0000:0000* FJSRQQ 0000:0000* FISRQQ @@ -186,95 +191,94 @@ Module: /dos/fdos/watcom2/lib286/noemu87.lib(emustub.asm) 0000:0000* FJARQQ 0000:0000 FICRQQ 0000:0000* FIARQQ -0000:10ec* __init_87_emulator +0000:1278* __init_87_emulator Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(setefg.c) -0000:10ec __setEFGfmt_ +0000:1278 __setEFGfmt_ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(chk8087.c) -0000:1124* _fpreset_ -0000:114f __init_8087_ -0000:1182+ __default_sigfpe_handler_ -0000:11d7 __chk8087_ +0000:12b0* _fpreset_ +0000:12db __init_8087_ +0000:135a __chk8087_ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(enterdb.c) -0000:1247 __EnterWVIDEO_ -0393:03a8+ ___WD_Present +0000:13ca __EnterWVIDEO_ +03ab:03a8+ ___WD_Present Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(___argc.c) -0393:2c1c ____Argv -0393:2c20 ____Argc +03ab:2f64 ____Argv +03ab:2f68 ____Argc Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(amblksiz.c) -0393:03aa __amblksiz +03ab:03aa __amblksiz Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(exit.c) -0000:126b+ _null_exit_rtn_ -0000:126b+ __null_int23_exit_ -0000:126c exit_ -0000:128d+ _exit_ -0393:03ac+ ___int23_exit -0393:03b0 ___FPE_handler_exit +0000:13ee+ __null_int23_exit_ +0000:13ef exit_ +0000:1407* _exit_ +03ab:03ac+ ___int23_exit +03ab:03b0 ___FPE_handler_exit Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(sgdef086) -0393:046c __Start_XI -0393:0484 __End_XI -0393:0484 __Start_YI -0393:0484 __End_YI +03ab:046c __Start_XI +03ab:0484 __End_XI +03ab:0484 __Start_YI +03ab:0484 __End_YI Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(noefgfmt.c) -0393:03b4 ___EFG_printf -0393:03b8 ___EFG_scanf +03ab:03b4 ___EFG_printf +03ab:03b8 ___EFG_scanf Module: /dos/fdos/watcom2/lib286/math87h.lib(efgfmt.c) -0000:12bd _EFG_Format_ +0000:1432 _EFG_Format_ Module: /dos/fdos/watcom2/lib286/math87h.lib(cnvs2d.c) -0000:148f __cnvs2d_ +0000:1604 __cnvs2d_ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(8087cw.c) -0393:03bc __8087cw +03ab:03bc __8087cw Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(save8087.c) -0393:03be ___Save8087 -0393:03c2 ___Rest8087 +03ab:03be ___Save8087 +03ab:03c2 ___Rest8087 Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(grabfp87.c) -0000:14af __GrabFP87_ +0000:1624 __GrabFP87_ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(ini87086.asm) -0000:14e2* __init_8087_emu -0000:14e8 __x87id +0000:1656* __init_8087_emu +0000:165c __x87id Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(rtcntrl.c) -0000:1545* _SetLD64bit_ -0000:1550* _SetLD80bit_ -0000:155b _LDisDouble_ +0000:16b9* _SetLD64bit_ +0000:16c4* _SetLD80bit_ +0000:16cf _LDisDouble_ Module: /dos/fdos/watcom2/lib286/math87h.lib(ldcvt.c) -0000:16c0 _LDScale10x_ -0000:1f98 __LDcvt_ +0000:1834 _LDScale10x_ +0000:210c+ __cvtld_ +0000:28e8 __LDcvt_ Module: /dos/fdos/watcom2/lib286/math87h.lib(strtod.c) -0000:2fa5+ __Strtold_ -0000:31e4 strtod_ +0000:312a+ __Strtold_ +0000:3369 strtod_ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(fpe87.asm) -0000:338a __Init_FPE_handler_ -0000:33c3 __Fini_FPE_handler_ -0000:33fa* __FPEHandler +0000:3510 __Init_FPE_handler_ +0000:3549 __Fini_FPE_handler_ +0000:3580* __FPEHandler Module: /dos/fdos/watcom2/lib286/math87h.lib(ldclass.c) -0000:368c __LDClass_ -0000:3712* _FLClass_ +0000:3812 __LDClass_ +0000:3898* _FLClass_ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(i4d.asm) -0000:3726 __I4D -0000:3775* __U4D +0000:38ac __I4D +0000:38fb* __U4D Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(istable.c) -0393:0044 __IsTable +03ab:0044 __IsTable Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(tolower.c) -0000:37f9 tolower_ +0000:397f tolower_ Module: /dos/fdos/watcom2/lib286/math87h.lib(bufld086.asm) -0000:3808 __ZBuf2LD +0000:398e __ZBuf2LD Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(seterrno.c) -0000:38d0* __set_EDOM_ -0000:38dc __set_ERANGE_ -0000:38e8* __set_EINVAL_ +0000:3a56* __set_EDOM_ +0000:3a62 __set_ERANGE_ +0000:3a6e* __set_EINVAL_ Module: /dos/fdos/watcom2/lib286/math87h.lib(inf_nan.c) -0393:0146* ___f_infinity -0393:014a* ___f_posqnan -0393:014e ___d_infinity -0393:0156 ___d_posqnan -0393:015e* ___ld_infinity -0393:0166* ___ld_posqnan +03ab:0146* ___f_infinity +03ab:014a* ___f_posqnan +03ab:014e ___d_infinity +03ab:0156 ___d_posqnan +03ab:015e* ___ld_infinity +03ab:0166* ___ld_posqnan Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(hugeval.c) -0393:016e __HugeValue +03ab:016e __HugeValue Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(fpeint.c) -0393:046a ___FPE_int +03ab:046a ___FPE_int Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(errno.c) -0000:3902* __get_errno_ptr_ -0393:2e26 _errno +0000:3a88* __get_errno_ptr_ +03ab:316e _errno +---------------------------+ @@ -284,8 +288,8 @@ Module: /dos/fdos/watcom2/lib286/dos/clibh.lib(errno.c) Undefined Symbol Referenced by ================ ============= -setplzparas_ plz.o(/dos/z/plz/plz.c) plzline_ plz.o(/dos/z/plz/plz.c) +psini_WriteWord_ asmyt.o(/dos/z/plz/asmyt.c) +--------------------+ diff --git a/plzpart.o b/plzpart.o index dc0baf0..799d154 100755 Binary files a/plzpart.o and b/plzpart.o differ diff --git a/tweak.o b/tweak.o index cc84575..6bb852e 100755 Binary files a/tweak.o and b/tweak.o differ