?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. ;; Example of using BasicLib.asm
  2. ;;
  3. ;;     Simple basic loader
  4. ;;
  5. ;; Generates tap file with basic loader
  6. ;; with some code to load and execute.
  7.  
  8.         INCLUDE BasicLib.asm
  9.         DEVICE  ZXSPECTRUM48
  10.         ORG     23755
  11.  
  12. line_useval = 1   ;; Last line will be RANDOMIZE USR VAL "32768"
  13.  
  14. basic
  15.         LINE : db clear,val,'"3e4"'     : LEND
  16.         LINE : db load,'"code"',code    : LEND
  17.         LINE : db rand,usr : NUM start  : LEND
  18. basend
  19.  
  20.         ORG     #8000
  21.  
  22. start   ld      hl,#0000        ;; Example of
  23.         ld      de,#4000        ;; some loaded and
  24.         ld      bc,#1B00        ;; executed code
  25.         ldir
  26.         ret
  27. codend
  28.  
  29.         DEFINE  tape    Simple-loader.tap
  30.  
  31.         EMPTYTAP tape
  32.         SAVETAP  tape , BASIC , "basic" , basic , basend-basic , 10
  33.         SAVETAP  tape , CODE  , "code"  , start , codend-start
  34.