home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 10: Diskmags / nf_archive_10.iso / MAGS / STFORMAT / STF04.MSA / 2ND_SIDE_GFADEMOS_ADD.LST < prev    next >
File List  |  1989-09-27  |  1KB  |  28 lines

  1. ' ******************************************************************
  2. ' *                                                                *
  3. ' *                             ADD.LST                            *
  4. ' *                                                                *
  5. ' *                Written for ST FORMAT MAGAZINE                  *
  6. ' *                                                                *
  7. ' *          This program will run in GFA Basic V2 or V3           *
  8. ' *                                                                *
  9. ' *                                                                *
  10. ' ******************************************************************
  11. '
  12. ' DEMO of how to call a machine code program
  13. ' the binary file ADD.BIN is on the disk
  14. '
  15. Dim A%(12/4)! space for the machine code (all of 12 bytes!)
  16. '
  17. Bload "add.bin",Varptr(A%(0)) ! load the file
  18. '
  19. Mc%=Varptr(A%(0))  ! get start address of the machine code
  20. '
  21. S=C:Mc%(L:3,L:8)! do the call, passing two numbers to be added
  22. '
  23. ' 3 will be added to 8. You could call with variables if you wish
  24. ' the result is returned in S
  25. '
  26. '
  27. Print S
  28.