?login_element?

Subversion Repositories NedoOS

Rev

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

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