home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / Programme_zum_Heft / Programmieren / Kurztests / ACE / Prgs / MC / caps.b next >
Text File  |  1994-01-10  |  798b  |  31 lines

  1. '...Calling  machine language from ACE.
  2.  
  3. '...This routine does the same thing as UCASE$
  4. '...and is taken from the AmigaBASIC manual 
  5. '...(6-12) with two modifications: (i) the correct
  6. '...array size is 26 not 27; (ii) ACE demands that
  7. '...a MC routine's address be stored in a long
  8. '...integer variable, not single-precision as
  9. '...in the AmigaBASIC manual's example.
  10.  
  11. DIM code%(26)
  12.  
  13. FOR i=0 to 26
  14.    READ code%(i)
  15. NEXT
  16.  
  17. INPUT "Mixed case string";S$
  18. Ucase& = VARPTR(code%(0))
  19. length& = LEN(S$) : addr&=SADD(S$)
  20.  
  21. CALL Ucase&(length&,addr&)
  22.  
  23. PRINT "The converted string is:"
  24. PRINT S$
  25.  
  26. DATA &H48e7,&Hc080,&H202f,&H0010,&H206f,&H0014
  27. DATA &H4281,&H6000,&H001c,&H1230,&H0000,&H0c01
  28. DATA &H0061,&H6d00,&H0010,&H0c01,&H007a,&H6e00
  29. DATA &H0008,&H0230,&H00df,&H0000,&H51c8,&Hffe4
  30. DATA &H4cdf,&H0103,&H4e75
  31.