home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities2 / desklib / Libraries / PDriver / s / PageSize < prev    next >
Encoding:
Text File  |  1993-07-06  |  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:    PDriver.PageSize.s
  11. ;   Author:  Copyright © 1993 Jason Howat
  12. ;   Version: 1.00 (06 Jul 1993)
  13. ;   Purpose: Read the size of the paper and how big the printable area is.
  14.  
  15.         GET     h.regdefs
  16.         GET     h.swinos
  17.         GET     h.macros
  18.  
  19. ; os_error *PDriver_PageSize(wimp_point *size, wimp_rect *printable);
  20.  
  21.         PREAMBLE
  22.         STARTCODE PDriver_PageSize
  23. ;
  24.         STMFD   sp!, {r4,r5,r6,r7,r8,lr}
  25.         MOV     r7, a1
  26.         MOV     r8, a2
  27.         SWI     SWI_PDriver_PageSize + XOS_Bit
  28.         LDMVSFD sp!, {r4,r5,r6,r7,r8,pc}^
  29.         CMP     r7, #0
  30.         STMNEIA r7, {r1,r2}
  31.         CMP     r8, #0
  32.         STMNEIA r8, {r3,r4,r5,r6}
  33.         MOV     a1, #0
  34.         LDMFD   sp!, {r4,r5,r6,r7,r8,pc}^
  35. ;
  36.         END
  37.