?login_element?

Subversion Repositories NedoOS

Rev

Rev 126 | Blame | Compare with Previous | Last modification | View Log | Download

  1. ; future docs designed here:
  2. ; SAVEDEV <filename>,<startPage>,<startOffset>,<length>
  3. ;   Works only in real device emulation mode. See <link linkend="po_device">DEVICE</link>.
  4. ;
  5. ;   Like <link linkend="po_savebin">SAVEBIN</link>, saves the block of device RAM.
  6. ;
  7. ;   But it allows lengths over 64ki, and the offset value goes directly into device
  8. ;   virtual memory (where pages are allocated consecutively), ignoring current slot
  9. ;   "mapping". I.e. page=2,offset=0 will start saving data from page 2 at its beginning,
  10. ;   going through pages 3, 4, 5, ... until the requested length of data is saved.
  11. ;
  12. ;   The offset is not limited to page size, i.e. arguments page=1,offset=0x500 are equal
  13. ;   to arguments page=0,offset=0x4500 for ZXSPECTRUM128 device (has page size 0x4000).
  14. ;
  15.     DEVICE NONE
  16.     SAVEDEV "savedevB.bin",0,0,1
  17.     DEVICE ZXSPECTRUM128
  18.     ; test error messages of SAVEDEV - missing arguments
  19.     SAVEDEV
  20.     SAVEDEV "savedevB.bin"
  21.     SAVEDEV "savedevB.bin",
  22.     SAVEDEV "savedevB.bin",0
  23.     SAVEDEV "savedevB.bin",0,
  24.     SAVEDEV "savedevB.bin",0,0
  25.     SAVEDEV "savedevB.bin",0,0,
  26.  
  27.     ; test error messages of SAVEDEV - wrong arguments
  28.     SAVEDEV "savedevB.bin",-1,0,1      ; wrong page
  29.     SAVEDEV "savedevB.bin",8,0,1       ; wrong page
  30.     SAVEDEV "savedevB.bin",0,0,0       ; should be just warning about zero length (no file)
  31.     SAVEDEV "savedevB.bin",0,-1,0      ; negative offset
  32.     SAVEDEV "savedevB.bin",1,-0x4001,0 ; negative offset
  33.     SAVEDEV "savedevB.bin",0,0x20000,0 ; offset beyond ZX128 memory
  34.     SAVEDEV "savedevB.bin",7,0x4000,0  ; offset beyond ZX128 memory
  35.     SAVEDEV "savedevB.bin",0,9,-1      ; negative length
  36.     SAVEDEV "savedevB.bin",7,0x3FFF,2  ; length is +1 byte more than possible
  37.