home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / desklib / Libraries / KernelSWIs / s / OSByte next >
Encoding:
Text File  |  1993-12-04  |  1.2 KB  |  37 lines

  1. ;   ####             #    #     # #
  2. ;   #   #            #    #       #          The FreeWare C library for 
  3. ;   #   #  ##   ###  #  # #     # ###             RISC OS machines
  4. ;   #   # #  # #     # #  #     # #  #   ___________________________________
  5. ;   #   # ####  ###  ##   #     # #  #                                      
  6. ;   #   # #        # # #  #     # #  #    Please refer to the accompanying
  7. ;   ####   ### ####  #  # ##### # ###    documentation for conditions of use
  8. ;   ________________________________________________________________________
  9. ;
  10. ;   File:    KernelSWIs.s.OSByte
  11. ;   Author:  Copyright © 1993 Jason Howat
  12. ;   Version: 1.00 (04 Dec 1993)
  13. ;   Purpose: Generic veneer to the OS_Byte SWI.
  14.  
  15.         GET     h.regdefs
  16.         GET     h.swinos
  17.         GET     h.macros
  18.  
  19. ; os_error *OS_Byte(osbyte_number reason, int r1in, int r2in,
  20. ;                                         int *r1out, int *r2out);
  21.  
  22.         PREAMBLE
  23.         STARTCODE OS_Byte
  24. ;
  25.         MOV     ip, sp
  26.         STMFD   sp!, {lr}
  27.         SWI     SWI_OS_Byte + XOS_Bit
  28.         MOVVC   r0, #0
  29.         CMP     r3, #0
  30.         STRNE   r1, [r3]
  31.         LDR     r3, [ip]
  32.         CMP     r3, #0
  33.         STRNE   r2, [r3]
  34.         LDMFD   sp!, {pc}^
  35. ;
  36.         END
  37.