LD   BC,(1900H)
  LD   B,8
  LD   DE,(1901H)
  LD   D,0
  LD   HL,0
  SRL  C 
  JR   NC,NOADD
  ADD  HL,DE
  SLA  E 
  RL   D
  DEC  B
  JP   NZ,MULT
  LD   (1902H),HL
  HALT
  .END

Error messages:

  1. invalid argument of the instruction. 'NOADD'
  2. Invalid argumenr of the instruction. 'MULT'
2

There are 2 answers

2
supercat On

You need to define labels for the addresses you want those instructions to branch to. Otherwise the assembler will have no idea what address to use.

0
tum_ On

Here is an example of 16x16->16 for you:

; MUL16 - MULTIPLY TWO SIXTEEN BIT NUMBERS WITH A 16 BIT RESULT.
;         DE = MULTIPLICAND
;         BC = MULTIPLIER
;         HL = PRODUCT
;
;         DE*BC=HL
;
        EXPORT  MUL16
MUL16
        LD      A,C             ; MULTIPLIER LOW PLACED IN A
        LD      C,B             ; MULTIPLIER HIGH PLACED IN C
        LD      B,16D           ; COUNTER (16 BITS)
        LD      HL,0            ;
MULT
        SRL     C               ; RIGHT SHIFT MULTIPLIER HIGH
        RRA                     ; ROTATE RIGHT MULTIPLIER LOW
        JR      NC,NOADD        ; TEST CARRY
        ADD     HL,DE           ; ADD MULTIPLICAND TO RESULT
NOADD
        EX      DE,HL
        ADD     HL,HL           ; SHIFT MULTIPLICAND LEFT
        EX      DE,HL           ;
        DJNZ    MULT            ;
        RET

Note that your assembler (unknown to us) may require different syntax for labels and/or comments. The documentation to your assembler is the best place to find these details.