I can run the motors so X,Y and Z all arrive at their target simultaneously, I can read all the buttons and quadrature encoders, I can light the lights and stuff. I can read a sequence of positions and speeds from a serial host then execute them as a tool path.Whether that is of any use to you rather depends on whether this next bit looks like something you could understand...

;
;***********************************************
;
; Home: Go to the limit switches then return
;
;***********************************************
;
Home:
ld hl,0 ; zero coords so we get the return offset
ld (Xcoord),hl
ld (Ycoord),hl
ld (Zcoord),hl
;
ld a,4 ; Set the sequence so it starts
ld (hseq),a ; with a lift
ld hl,NmiHome ; Tune in to the Home service
ld (NMI),hl
;
call NotIdleLoop; ; returns when stepping is complete
;
ld hl,0 ; We started from zero so the position
ld de,(Xcoord) ; counters will have the distance moved
and a ; To get a return co-ordinate we need
sbc hl,de ; to reverse the counts.
ld (mX),hl ; subtract the position from zero
;
ld hl,0 ; repeat for Y
ld de,(Ycoord)
and a
sbc hl,de