Subversion Repositories NedoOS

Rev

Rev 69 | Rev 528 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download

  1.         DEVICE ZXSPECTRUM128
  2.         include "../_sdk/sys_h.asm"
  3.  
  4.         org PROGSTART
  5. cmd_begin
  6.         ld sp,0x4000
  7.         OS_GETSCREENPAGES
  8. ;de=pages of screen 0 (d=higher page), hl=pages of screen 1 (h=higher page)
  9.         ld a,e
  10.         ld (cmdpgscreen0_0),a
  11.  
  12. hobetarunner=#4100
  13.         ld a,(cmdpgscreen0_0)
  14.         sub 4-1 ;ld a,#ff-4 ;pgkillable
  15.         SETPG16K
  16.  
  17.         ld hl,washobetarunner
  18.         ld de,hobetarunner
  19.         ld bc,hobetarunner_sz
  20.         ldir
  21. cmdpgscreen0_0=$+1
  22.         ld a,#ff-1
  23.         SETPG32KLOW
  24.         inc a ;ld a,#ff-0
  25.         SETPG32KHIGH
  26.  
  27.         ;call loadhobeta
  28.         ;ret nz ;error
  29.         ;ld hl,#6000
  30.         ;ld bc,(#6000-17+11) ;len
  31.         ;add hl,bc
  32.         ;dec hl ;hl=load end
  33.         ;ex de,hl
  34.         ;ld hl,(#6000-17+9) ;start
  35.         ;ld (hobetarunner_jp),hl
  36.         ;add hl,bc
  37.         ;dec hl
  38.         ;ex de,hl ;de=destination end
  39.         ;lddr
  40.         jp hobetarunner
  41.  
  42. washobetarunner
  43. ;pgsys=pagexor-10
  44. ;pgfatfs=pagexor-9
  45. ;pgtrdosfs=pagexor-8
  46. ;pgkillable=pagexor-4 ;т 128K ярь Єш, Є.ъ. ьюцэю яюЁЄшЄ№
  47.         disp hobetarunner ;in pgkillable
  48. ;$c loaded in pages 4,1,0
  49. ;only ATM2 ports here!
  50.         di
  51.         ld a,#7f-5
  52.         ld bc,#bff7
  53.         out (c),a
  54.         ld a,#7f-4
  55.         ld bc,#fff7
  56.         out (c),a
  57.         ld hl,#c000
  58.         ld de,#8000
  59.         ld bc,#4000
  60.         ldir ;pg4 -> pg5
  61.         ld a,#7f-8;pgtrdosfs
  62.         ld bc,#fff7
  63.         out (c),a
  64.         ld hl,#1c00+#c000
  65.         ld de,#1c00+#8000
  66.         ld bc,#400
  67.         ldir ;restore sysvars
  68.         ld a,#7f-2
  69.         ld bc,#bff7
  70.         out (c),a
  71.         ld a,#7f-1
  72.         ld bc,#fff7
  73.         out (c),a
  74.         ld hl,#c000
  75.         ld de,#8000
  76.         ld bc,#4000
  77.         ldir ;pg1 -> pg2
  78.         ld a,#7f-0+#80
  79.         ld bc,#fff7
  80.         out (c),a
  81.         ld a,#00
  82.         ld bc,#7ffd
  83.         out (c),a
  84.         ld a,#81 ;128 basic (with 7ffd)
  85.         ld bc,#3ff7
  86.         out (c),a
  87.         ld a,#7f-5
  88.         ld bc,#7ff7
  89.         out (c),a
  90. ;128: pages 128/DOS,5,2,0(7ffd)
  91.         ld a,#10
  92.         ld bc,#7ffd
  93.         out (c),a
  94. ;48: pages 2,4,4,4
  95.         ld a,#7f-5
  96.         ld bc,#7ff7
  97.         out (c),a
  98.         ld a,#7f-2
  99.         ld bc,#bff7
  100.         out (c),a
  101.         ld a,#7f-0+#80
  102.         ld bc,#fff7
  103.         out (c),a
  104.         ld a,#83 ;48 basic switchable to DOS
  105.         ld bc,#3ff7
  106.         out (c),a
  107. ;48: pages 48/DOS,5,2,0(7ffd)
  108.        
  109.         LD A,%10101011 ;6912
  110.         ld bc,#ff77 ;shadow ports off, palette off
  111.         out (c),a
  112.         ld sp,#6000
  113.         ei
  114.          ld a,0
  115.          ld bc,#7ffd
  116.          out (c),a ;for 128 basic (яЁютхЁхэю, ЁрсюЄрхЄ, 48 Єюцх ЁрсюЄрхЄ)
  117. hobetarunner_jp=$+1
  118.         jp 0;#6000
  119.         ent
  120. hobetarunner_sz=$-washobetarunner
  121.  
  122. cmd_end
  123.  
  124.         display "Size ",/d,cmd_end-cmd_begin," bytes"
  125.  
  126.         savebin "reset.com",cmd_begin,cmd_end-cmd_begin
  127.        
  128.         ;LABELSLIST "../us/user.l"
  129.