; Simple code used to try out NICE and Z80 analyzer ; tasm -80 -g3 nicecode.asm nicecode.bin .ORG 00000h ; START_ADDR .equ 0000h ;start summing at address 0 ; start: di ;disable ints ld sp,80F0h ;point stack to RAM area ;try out some prefix opcodes first ld a,0A5h ld (08000h),A ;32 00 08 save it in RAM ld ix,08000h ;DD 21 00 08 pt to RAM inc (ix+0Ah) ;DD 34 0A ld iy,08002h ;FD 21 02 08 res 0,(iy+8) ;FD CB 08 86 (23 clk cycles) ld c,80h ;0E 80 in a,(c) ;ED 78 ld (ix+10h),69h ;DD 36 10 69 ld (8006h),iy ;FD 22 06 80 set 0,(ix+6) ;DD CB 06 C6 ld a,00h set 3,a ;CB DF ld de,1234h ld (800Ch),de ;ED 53 0C 80 ld hl,START_ADDR ld ix,0000h ;DD 21 00 00 clear sum at start lp: ld a,(hl) ;read a byte ld c,a ld b,0 add ix,bc ;add bc to sum in ix inc l ld a,l and a ;set flags jr nz,lp ;loop until we wrap l push ix ;write out result in a,(020H) out (040H),a halt jp start ;that's it... .end