org 100h ; program load point under CP/M ; ; the assembler itself will negate an ; 8 or 16-bit constant for us ; mvi a,-43 ; a = D5 lxi h,-43 ; hl = FFD5 ; ; no built-in opcode to negate an 8-bit ; register, but nevertheless easily done ; mvi a,43 ; a = 2B cma inr a ; a = D5 ; ; the same approach for 16-bit values ; lxi h,43 ; hl = 002B mov a,l cma mov l,a mov a,h cma mov h,a inx h ; hl = FFD5 ; jmp 0 ; exit to CP/M end