Instruction manual

0175 23 inc hl ;hl now points to next value
0176 22 04 db ld (value_pointer),hl
0179 2a 06 db ld hl,(current_value) ;get back current value
017c 3d decimal_add: dec a ;add loop to increase total value
017d fa 84 01 jp m,decimal_add_done ;end of multiplication
0180 19 add hl,de
0181 c3 7c 01 jp decimal_add
0184 22 06 db decimal_add_done: ld (current_value),hl
0187 c3 50 01 jp decimal_next_char
018a 37 decimal_error: scf
018b c9 ret
018c c3 7c 01 jp decimal_add
018f 01 00 0a 00 64 00 e8 03 10 27 decimal_place_value: defw 1,10,100,1000,10000
0199 ;
0199 ;Memory dump
0199 ;Displays a 256-byte block of memory in 16-byte rows.
0199 ;Called with address of start of block in HL
0199 22 00 db memory_dump: ld (current_location),hl ;store address of block to be displayed
019c 3e 00 ld a,000h
019e 32 03 db ld (byte_count),a ;initialize byte count
01a1 32 02 db ld (line_count),a ;initialize line count
01a4 c3 d9 01 jp dump_new_line
01a7 2a 00 db dump_next_byte: ld hl,(current_location) ;get byte address from storage,
01aa 7e ld a,(hl) ;get byte to be converted to string
01ab 23 inc hl ;increment address and
01ac 22 00 db ld (current_location),hl ;store back
01af 21 08 db ld hl,buffer ;location to store string
01b2 cd 88 00 call byte_to_hex_string ;convert
01b5 21 08 db ld hl,buffer ;display string
01b8 cd 18 00 call write_string
01bb 3a 03 db ld a,(byte_count) ;next byte
01be 3c inc a
01bf ca 09 02 jp z,dump_done ;stop when 256 bytes displayed
01c2 32 03 db ld (byte_count),a ;not finished yet, store
01c5 3a 02 db ld a,(line_count) ;end of line (16 characters)?
01c8 fe 0f cp 00fh ;yes, start new line
01ca ca d9 01 jp z,dump_new_line
01cd 3c inc a ;no, increment line count
01ce 32 02 db ld (line_count),a
01d1 3e 20 ld a,020h ;print space
52