home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / ENTERPRS / CPM / UTILS / S / UZI.ARK / EXTRAS.C < prev    next >
Text File  |  1988-11-30  |  768b  |  59 lines

  1. /**************************************************
  2. UZI (Unix Z80 Implementation) Kernel:  extras.c
  3. ***************************************************/
  4.  
  5.  
  6. bcopy()
  7. {
  8. #asm 8080
  9. ; BCOPY(SRC,DEST,COUNT)
  10. ;
  11.         POP     H
  12.         SHLD    HOLDER
  13. .Z80
  14.         LD      (BCHLDR),BC
  15. .8080   
  16.         POP     B
  17.         POP     D
  18.         POP     H
  19.         PUSH    H
  20.         PUSH    H
  21.         PUSH    H
  22. .Z80
  23.         LDIR
  24. .8080
  25.         LHLD    HOLDER
  26. .Z80
  27.         LD      BC,(BCHLDR)
  28. .8080
  29.         PCHL
  30. #endasm
  31. }
  32.  
  33. #asm 
  34. ;
  35. HOLDER: DS      2
  36. BCHLDR: DS      2
  37. ;
  38. ;
  39. #endasm
  40.  
  41.  
  42. bzero(ptr,count)
  43. char *ptr;
  44. int count;
  45. {
  46.     *ptr = 0;
  47.     bcopy(ptr,ptr+1,count-1);
  48. }
  49.  
  50.  
  51. abort()
  52. {
  53. #asm 8080
  54.         DI
  55.         JMP     $
  56. #endasm
  57. }
  58.  
  59.