title Module from library BASE_3 : NUMFIX name ('NUMFIX') maclib baselib.lib ; Negate number conditionally ; Copyright (C) Werner Cirsovius ; Hohe Weide 44 ; D-20253 Hamburg ; Tel.: +49-40-4223247 ; Version 1.0, August 1986 ; ENTRY HL holds hex number ; Location SIGN1 and SIGN2 must be set up properly ; (Usually done by module NUMPOS) ; EXIT HL holds number fixed depending on opponent signs entry @nmfix extrn @sign1,@sign2,neghl @nmfix: ld a,(@sign1) ; Get sign of first number or a jp m,num?? ld a,(@sign2) ; Test opponent sign or a jp m,neghl num??: ld a,(@sign2) ; Test opponent sign or a jp p,neghl ret end