?login_element?

Subversion Repositories NedoOS

Rev

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

  1. ;; Example of using BasicLib.asm
  2. ;;
  3. ;;     Machine code in REM
  4. ;;
  5. ;; Generates tap file with the basic
  6.  
  7.         INCLUDE BasicLib.asm
  8.  
  9.         DEFINE   tape   "Code-in-REM.tap"
  10.         EMPTYTAP tape
  11.  
  12.  
  13.         TAPOUT  tape,0          ;; Standart 17-byte file header
  14.         db      0               ;; File type
  15.         db      code,in,rem     ;; File name
  16.         db      '       '       ;; Padding to 10 chars
  17.         dw      basic_length    ;; File total length
  18.         dw      10              ;; Start basic line
  19.         dw      basic_length    ;; Pure basic length
  20.         TAPEND
  21.  
  22.  
  23.         TAPOUT  tape            ;; File body
  24.         ORG     23755
  25. basic
  26.         LINE
  27.         db      rem
  28. ;;;; machine code example begin ;;;;
  29. start   ld      hl,#0000
  30.         ld      de,#4000
  31.         ld      bc,#1B00
  32.         ldir
  33.         ret
  34. ;;;; machine code example end ;;;;;;
  35.         LEND
  36.  
  37.         LINE
  38.         db      rand,usr
  39.         NUM     start
  40.         LEND
  41.  
  42. basic_length = $-basic
  43.  
  44.         TAPEND
  45.