Subversion Repositories Kolibri OS

Rev

Rev 2540 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2540 Rev 3359
Line 89... Line 89...
89
        pop     ax
89
        pop     ax
90
        jnc     @f
90
        jnc     @f
91
        inc     si
91
        inc     si
92
        cmp     si, 10
92
        cmp     si, 10
93
        jb      @b
93
        jb      @b
-
 
94
sayerr_badsect:
94
        mov     si, badsect
95
        mov     si, badsect
95
sayerr_plain:
96
sayerr_plain:
96
        call    printplain
97
        call    printplain
97
        jmp     $
98
        jmp     $
98
@@:
99
@@:
Line 143... Line 144...
143
;                           16 BIT CODE
144
;                           16 BIT CODE
144
;
145
;
145
;=========================================================================
146
;=========================================================================
Line 146... Line 147...
146
 
147
 
-
 
148
include 'bootvesa.inc'                 ;Include source for boot vesa 
-
 
149
if defined extended_primary_loader
-
 
150
include 'parsers.inc'
Line 147... Line 151...
147
include 'bootvesa.inc'                 ;Include source for boot vesa 
151
end if
-
 
152
 
-
 
153
start_of_code:
-
 
154
 
-
 
155
if defined extended_primary_loader
-
 
156
; save data from primary loader
-
 
157
        mov     word [cs:bootcallback], si
-
 
158
        mov     word [cs:bootcallback+2], ds
-
 
159
        push    cs
-
 
160
        pop     ds
-
 
161
        mov     [bootdevice], ax
-
 
162
        mov     [bootfs], bx
-
 
163
 
-
 
164
; set up stack
-
 
165
        mov     ax, 3000h
-
 
166
        mov     ss, ax
-
 
167
        mov     sp, 0EC00h
-
 
168
 
-
 
169
; try to load configuration file
-
 
170
        mov     ax, 1
-
 
171
        mov     di, config_file_struct
-
 
172
        call    [bootcallback]
-
 
173
        cld
-
 
174
        push    cs
-
 
175
        pop     es
-
 
176
; bx=0 - ok, bx=1 - part of file loaded, assume this is ok
-
 
177
        cmp     bx, 1
-
 
178
        ja      .config_bad
-
 
179
; configuration file was loaded, parse
-
 
180
; if length is too big, use first 0FFFFh bytes
-
 
181
        test    dx, dx
-
 
182
        jz      @f
-
 
183
        mov     ax, 0FFFFh
-
 
184
@@:
-
 
185
; ds:si will be pointer to current data, dx = limit
-
 
186
        xchg    ax, dx
-
 
187
        push    4000h
-
 
188
        pop     ds
-
 
189
        xor     si, si
-
 
190
.parse_loop:
-
 
191
; skip spaces
-
 
192
        cmp     si, dx
-
 
193
        jae     .parse_done
-
 
194
        lodsb
-
 
195
        cmp     al, ' '
-
 
196
        jbe     .parse_loop
-
 
197
        dec     si
-
 
198
; loop over all possible configuration values
-
 
199
        mov     bx, config_file_variables
-
 
200
.find_variant:
-
 
201
; get length
-
 
202
        mov     cx, [es:bx]
-
 
203
; zero length = end of list
-
 
204
        jecxz   .find_newline
-
 
205
; skip over length
-
 
206
        inc     bx
-
 
207
        inc     bx
-
 
208
        mov     di, bx
-
 
209
; skip over string
-
 
210
        add     bx, cx
-
 
211
; test whether we have at least cx symbols left
-
 
212
        mov     ax, cx
-
 
213
        add     ax, si
-
 
214
        jc      .next_variant1
-
 
215
        cmp     ax, dx
-
 
216
        jae     .next_variant1
-
 
217
; save current position
-
 
218
        push    si
-
 
219
; compare strings
-
 
220
        repz cmpsb
-
 
221
        jnz     .next_variant2
-
 
222
; strings are equal; look for "=" with possible spaces before and after
-
 
223
@@:
-
 
224
        cmp     si, dx
-
 
225
        jae     .next_variant2
-
 
226
        lodsb
-
 
227
        cmp     al, ' '
-
 
228
        jbe     @b
-
 
229
        cmp     al, '='
-
 
230
        jnz     .next_variant2
-
 
231
; ok, we found the true variant
-
 
232
; ignore saved position on the stack
-
 
233
        pop     ax
-
 
234
; call the parser
-
 
235
        call    word [es:bx]
-
 
236
; line parsed, find next
-
 
237
.find_newline:
-
 
238
        cmp     si, dx
-
 
239
        jae     .parse_done
-
 
240
        lodsb
-
 
241
        cmp     al, 13
-
 
242
        jz      .parse_loop
-
 
243
        cmp     al, 10
-
 
244
        jz      .parse_loop
-
 
245
        jmp     .find_newline
-
 
246
.next_variant2:
-
 
247
; continue to the next variant, restoring current position
-
 
248
        pop     si
-
 
249
.next_variant1:
-
 
250
; continue to the next variant
-
 
251
; skip over the parser
-
 
252
        inc     bx
-
 
253
        inc     bx
-
 
254
        jmp     .find_variant
-
 
255
.parse_done:
-
 
256
.config_bad:
-
 
257
 
-
 
258
; set up segment registers
-
 
259
        push    cs
148
 
260
        pop     ds
149
start_of_code:
261
else
150
        cld
262
        cld
151
; \begin{diamond}[02.12.2005]
263
; \begin{diamond}[02.12.2005]
152
; if bootloader sets ax = 'KL', then ds:si points to loader block
264
; if bootloader sets ax = 'KL', then ds:si points to loader block
Line 173... Line 285...
173
; set up segment registers
285
; set up segment registers
174
        push    cs
286
        push    cs
175
        pop     ds
287
        pop     ds
176
        push    cs
288
        push    cs
177
        pop     es
289
        pop     es
-
 
290
end if
Line 178... Line 291...
178
 
291
 
179
; set videomode
292
; set videomode
180
        mov     ax, 3
293
        mov     ax, 3
Line 376... Line 489...
376
        mov     [es:BOOT_APM_DATA_16], dx
489
        mov     [es:BOOT_APM_DATA_16], dx
Line 377... Line 490...
377
 
490
 
378
apm_end:
491
apm_end:
Line -... Line 492...
-
 
492
        _setcursor d80x25_top_num, 0
379
        _setcursor d80x25_top_num, 0
493
 
380
 
494
if ~ defined extended_primary_loader
381
;CHECK current of code
495
;CHECK current of code
382
        cmp     [cfgmanager.loader_block], -1
496
        cmp     [cfgmanager.loader_block], -1
383
        jz      noloaderblock
497
        jz      noloaderblock
384
        les     bx, [cfgmanager.loader_block]
498
        les     bx, [cfgmanager.loader_block]
385
        cmp     byte [es:bx], 1
499
        cmp     byte [es:bx], 1
386
        mov     si, loader_block_error
500
        mov     si, loader_block_error
387
        jnz     sayerr
501
        jnz     sayerr
-
 
502
        push    0
Line 388... Line 503...
388
        push    0
503
        pop     es
389
        pop     es
504
end if
390
 
505
 
391
noloaderblock:
506
noloaderblock:
Line 402... Line 517...
402
; b) preboot_dma  = use DMA access?
517
; b) preboot_dma  = use DMA access?
403
; c) preboot_vrrm = use VRR?
518
; c) preboot_vrrm = use VRR?
404
; d) preboot_device = from what boot?
519
; d) preboot_device = from what boot?
Line 405... Line 520...
405
 
520
 
-
 
521
; determine default settings
406
; determine default settings
522
if ~ defined extended_primary_loader
-
 
523
        mov     [.bSettingsChanged], 0
Line 407... Line 524...
407
        mov     [.bSettingsChanged], 0
524
end if
408
 
525
 
409
;.preboot_gr_end:
526
;.preboot_gr_end:
410
        mov     di, preboot_device
527
        mov     di, preboot_device
411
; if image in memory is present and [preboot_device] is uninitialized,
528
; if image in memory is present and [preboot_device] is uninitialized,
412
; set it to use this preloaded image
529
; set it to use this preloaded image
-
 
530
        cmp     byte [di], 0
-
 
531
        jnz     .preboot_device_inited
-
 
532
if defined extended_primary_loader
-
 
533
        inc     byte [di]
-
 
534
        cmp     byte [bootdevice], 'f' ; floppy?
-
 
535
        jz      .preboot_device_inited
413
        cmp     byte [di], 0
536
        inc     byte [di]
414
        jnz     .preboot_device_inited
537
else
415
        cmp     [.loader_block], -1
538
        cmp     [.loader_block], -1
416
        jz      @f
539
        jz      @f
417
        les     bx, [.loader_block]
540
        les     bx, [.loader_block]
418
        test    byte [es:bx+1], 1
541
        test    byte [es:bx+1], 1
419
        jz      @f
542
        jz      @f
420
        mov     byte [di], 3
543
        mov     byte [di], 3
421
        jmp     .preboot_device_inited
544
        jmp     .preboot_device_inited
422
@@:
545
@@:
-
 
546
; otherwise, set [preboot_device] to 1 (default value - boot from floppy)
423
; otherwise, set [preboot_device] to 1 (default value - boot from floppy)
547
        mov     byte [di], 1
424
        mov     byte [di], 1
548
end if
425
.preboot_device_inited:
549
.preboot_device_inited:
426
; following 4 lines set variables to 1 if its current value is 0
550
; following 4 lines set variables to 1 if its current value is 0
427
        cmp     byte [di+preboot_dma-preboot_device], 1
551
        cmp     byte [di+preboot_dma-preboot_device], 1
428
        adc     byte [di+preboot_dma-preboot_device], 0
552
        adc     byte [di+preboot_dma-preboot_device], 0
429
        cmp     byte [di+preboot_biosdisk-preboot_device], 1
553
        cmp     byte [di+preboot_biosdisk-preboot_device], 1
430
        adc     byte [di+preboot_biosdisk-preboot_device], 0
554
        adc     byte [di+preboot_biosdisk-preboot_device], 0
431
; default value for VRR is OFF
555
;; default value for VRR is OFF
432
        cmp     byte [di+preboot_vrrm-preboot_device], 0
556
;        cmp     byte [di+preboot_vrrm-preboot_device], 0
433
        jnz     @f
557
;        jnz    @f
434
        mov     byte [di+preboot_vrrm-preboot_device], 2
558
;        mov    byte [di+preboot_vrrm-preboot_device], 2
435
@@:
559
;@@:
Line 436... Line 560...
436
; notify user
560
; notify user
437
        _setcursor 5,2
561
        _setcursor 5,2
Line 458... Line 582...
458
            call    draw_current_vmode
582
        call    draw_current_vmode
Line 459... Line 583...
459
 
583
 
460
        mov     si, usebd_msg
584
        mov     si, usebd_msg
461
        cmp     [preboot_biosdisk], 1
585
        cmp     [preboot_biosdisk], 1
462
        call    .say_on_off
586
        call    .say_on_off
463
        mov     si, vrrm_msg
587
;        mov     si, vrrm_msg
464
        cmp     [preboot_vrrm], 1
588
;        cmp     [preboot_vrrm], 1
465
        call    .say_on_off
589
;        call    .say_on_off
466
        mov     si, preboot_device_msg
590
        mov     si, preboot_device_msg
467
        call    print
591
        call    print
-
 
592
        mov     al, [preboot_device]
-
 
593
if defined extended_primary_loader
-
 
594
        and     eax, 3
468
        mov     al, [preboot_device]
595
else
-
 
596
        and     eax, 7
469
        and     eax, 7
597
end if
470
        mov     si, [preboot_device_msgs+eax*2]
598
        mov     si, [preboot_device_msgs+eax*2]
471
        call    printplain
599
        call    printplain
472
.show_remarks:
600
.show_remarks:
473
; show remarks in gray color
601
; show remarks in gray color
Line 544... Line 672...
544
        or      al, 20h
672
        or      al, 20h
545
        cmp     al, 'a'
673
        cmp     al, 'a'
546
        jz      .change_a
674
        jz      .change_a
547
        cmp     al, 'b'
675
        cmp     al, 'b'
548
        jz      .change_b
676
        jz      .change_b
549
        cmp     al, 'c'
677
;        cmp     al, 'c'
550
        jz      .change_c
678
;        jz      .change_c
551
        cmp     al, 'd'
679
        cmp     al, 'c'         ; 'd'
552
        jnz     .show_remarks
680
        jnz     .show_remarks
553
        _setcursor 15,0
681
        _setcursor 15,0
554
        mov     si, bdev
682
        mov     si, bdev
555
        call    print
683
        call    print
-
 
684
if defined extended_primary_loader
-
 
685
        mov     bx, '12'
-
 
686
else
556
        mov     bx, '14'
687
        mov     bx, '14'
-
 
688
end if
557
        call    getkey
689
        call    getkey
558
        mov     [preboot_device], al
690
        mov     [preboot_device], al
559
        _setcursor 13,0
691
        _setcursor 13,0
560
.d:
692
.d:
-
 
693
if ~ defined extended_primary_loader
561
        mov     [.bSettingsChanged], 1
694
        mov     [.bSettingsChanged], 1
-
 
695
end if
562
        call    clear_vmodes_table             ;clear vmodes_table
696
        call    clear_vmodes_table             ;clear vmodes_table
563
        jmp    .printcfg
697
        jmp     .printcfg
564
.change_a:
698
.change_a:
565
.loops:
699
.loops:
566
        call    draw_vmodes_table
700
        call    draw_vmodes_table
Line 576... Line 710...
576
        cmp     si,modes_table
710
        cmp     si, modes_table
577
        jbe     .loops
711
        jbe     .loops
578
        sub     word [cursor_pos],size_of_step
712
        sub     word [cursor_pos], size_of_step
579
        jmp     .loops
713
        jmp     .loops
Line -... Line 714...
-
 
714
 
580
 
715
.down:
581
.down:  cmp     ah,0x50;x,0x50E0               ; down
716
        cmp     ah, 0x50;x,0x50E0               ; down
582
        jne     .pgup
717
        jne     .pgup
583
        cmp     word[es:si+10],-1
718
        cmp     word[es:si+10], -1
584
        je      .loops        
719
        je      .loops
585
        add     word [cursor_pos],size_of_step
720
        add     word [cursor_pos], size_of_step
Line -... Line 721...
-
 
721
        jmp     .loops
586
        jmp     .loops
722
 
587
 
723
.pgup:
588
.pgup:  cmp     ah,0x49                 ; page up
724
        cmp     ah, 0x49                ; page up
589
        jne     .pgdn
725
        jne     .pgdn
590
        sub     si, size_of_step*long_v_table
726
        sub     si, size_of_step*long_v_table
591
        cmp     si, modes_table
727
        cmp     si, modes_table
Line 600... Line 736...
600
        mov     si, modes_table
736
        mov     si, modes_table
601
@@:
737
@@:
602
        mov     word [home_cursor], si
738
        mov     word [home_cursor], si
603
        jmp     .loops
739
        jmp     .loops
Line -... Line 740...
-
 
740
 
604
 
741
.pgdn:
605
.pgdn:  cmp     ah,0x51                 ; page down
742
        cmp     ah, 0x51                ; page down
606
        jne     .enter
743
        jne     .enter
607
        mov     ax, [end_cursor]
744
        mov     ax, [end_cursor]
608
        add     si, size_of_step*long_v_table
745
        add     si, size_of_step*long_v_table
609
        cmp     si, ax
746
        cmp     si, ax
Line 620... Line 757...
620
        mov     si, ax
757
        mov     si, ax
621
@@:
758
@@:
622
        mov     word [home_cursor], si
759
        mov     word [home_cursor], si
623
        jmp     .loops
760
        jmp     .loops
Line -... Line 761...
-
 
761
 
624
 
762
.enter:
625
.enter: cmp     al,0x0D;x,0x1C0D               ; enter
763
        cmp     al, 0x0D;x,0x1C0D               ; enter
626
        jne     .loops
764
        jne     .loops
627
        push    word [cursor_pos]
765
        push    word [cursor_pos]
628
        pop     bp
766
        pop     bp
629
        push    word [es:bp]
767
        push    word [es:bp]
Line 648... Line 786...
648
        mov     bx, '12'
786
        mov     bx, '12'
649
        call    getkey
787
        call    getkey
650
        mov     [preboot_biosdisk], al
788
        mov     [preboot_biosdisk], al
651
        _setcursor 11,0
789
        _setcursor 11,0
652
        jmp     .d
790
        jmp     .d
653
.change_c:
791
;.change_c:
654
        _setcursor 15,0
792
;        _setcursor 15,0
655
        mov     si, vrrmprint
793
;        mov     si, vrrmprint
656
        call    print
794
;        call    print
657
        mov     bx, '12'
795
;        mov     bx, '12'
658
        call    getkey
796
;        call    getkey
659
        mov     [preboot_vrrm], al
797
;        mov     [preboot_vrrm], al
660
        _setcursor 12,0
798
;        _setcursor 12,0
661
        jmp     .d
799
;        jmp     .d
662
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
800
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
663
.say_on_off:
801
.say_on_off:
664
        pushf
802
        pushf
665
        call    print
803
        call    print
666
        mov     si, on_msg
804
        mov     si, on_msg
667
        popf
805
        popf
668
        jz      @f
806
        jz      @f
669
        mov     si, off_msg
807
        mov     si, off_msg
-
 
808
@@:
670
@@:     jmp     printplain
809
        jmp     printplain
671
; novesa and vervesa strings are not used at the moment of executing this code
810
; novesa and vervesa strings are not used at the moment of executing this code
672
virtual at novesa
811
virtual at novesa
673
.oldtimer dd ?
812
.oldtimer dd ?
674
.starttime dd ?
813
.starttime dd ?
-
 
814
if ~ defined extended_primary_loader
675
.bSettingsChanged db ?
815
.bSettingsChanged db ?
-
 
816
end if
676
.timer dd ?
817
.timer dd ?
677
end virtual
818
end virtual
-
 
819
if ~ defined extended_primary_loader
678
.loader_block dd -1
820
.loader_block dd -1
-
 
821
end if
679
.gettime:
822
.gettime:
680
        mov     ah, 0
823
        mov     ah, 0
681
        int     1Ah
824
        int     1Ah
682
        xchg    ax, cx
825
        xchg    ax, cx
683
        shl     eax, 10h
826
        shl     eax, 10h
Line 690... Line 833...
690
        pushf
833
        pushf
691
        call    [.oldtimer]
834
        call    [.oldtimer]
692
        pushad
835
        pushad
693
        call    .gettime
836
        call    .gettime
694
        sub     eax, [.starttime]
837
        sub     eax, [.starttime]
-
 
838
if defined extended_primary_loader
-
 
839
        sub     ax, [preboot_timeout]
-
 
840
else
695
        sub     ax, 18*5
841
        sub     ax, 18*5
-
 
842
end if
696
        jae     .timergo
843
        jae     .timergo
697
        neg     ax
844
        neg     ax
698
        add     ax, 18-1
845
        add     ax, 18-1
699
        mov     bx, 18
846
        mov     bx, 18
700
        xor     dx, dx
847
        xor     dx, dx
Line 706... Line 853...
706
        jae     @f
853
        jae     @f
707
        cmp     al, 1
854
        cmp     al, 1
708
        mov     cl, 'ã'
855
        mov     cl, 'ã'
709
        jz      @f
856
        jz      @f
710
        mov     cl, 'ë'
857
        mov     cl, 'ë'
-
 
858
@@:
711
@@:     mov     [time_str+9], cl
859
        mov     [time_str+9], cl
712
else if lang eq et
860
else if lang eq et
713
        cmp     al, 1
861
        cmp     al, 1
714
        ja      @f
862
        ja      @f
715
        mov     [time_str+9], ' '
863
        mov     [time_str+9], ' '
716
        mov     [time_str+10],' '
864
        mov     [time_str+10], ' '
717
@@:
865
@@:
-
 
866
else if lang eq sp
-
 
867
; esperar 5/4/3/2 segundos, 1 segundo
-
 
868
        cmp     al, 1
-
 
869
        mov     cl, 's'
-
 
870
        ja      @f
-
 
871
        mov     cl, ' '
-
 
872
@@:
-
 
873
        mov     [time_str+10], cl
718
else
874
else
719
; wait 5/4/3/2 seconds, 1 second
875
; wait 5/4/3/2 seconds, 1 second
720
        cmp     al, 1
876
        cmp     al, 1
721
        mov     cl, 's'
877
        mov     cl, 's'
722
        ja      @f
878
        ja      @f
723
        mov     cl, ' '
879
        mov     cl, ' '
-
 
880
@@:
724
@@:     mov     [time_str+9], cl
881
        mov     [time_str+9], cl
725
end if
882
end if
726
        add     al, '0'
883
        add     al, '0'
727
        mov     [time_str+1], al
884
        mov     [time_str+1], al
728
        mov     si, time_msg
885
        mov     si, time_msg
729
        _setcursor 7,0
886
        _setcursor 7,0
Line 746... Line 903...
746
        call    printplain
903
        call    printplain
747
        _setcursor 6,0
904
        _setcursor 6,0
748
        mov     si, loading_msg
905
        mov     si, loading_msg
749
        call    print
906
        call    print
750
        _setcursor 15,0
907
        _setcursor 15,0
-
 
908
if ~ defined extended_primary_loader
751
        cmp     [.bSettingsChanged], 0
909
        cmp     [.bSettingsChanged], 0
752
        jz      .load
910
        jz      .load
753
        cmp     [.loader_block], -1
911
        cmp     [.loader_block], -1
754
        jz      .load
912
        jz      .load
755
        les     bx, [.loader_block]
913
        les     bx, [.loader_block]
Line 786... Line 944...
786
        mov     byte [si+80], 0
944
        mov     byte [si+80], 0
787
        _setcursor 15,0
945
        _setcursor 15,0
788
        call    printplain
946
        call    printplain
789
        _setcursor 15,0
947
        _setcursor 15,0
790
.load:
948
.load:
-
 
949
end if
791
; \end{diamond}[02.12.2005]
950
; \end{diamond}[02.12.2005]
Line 792... Line 951...
792
 
951
 
Line 793... Line 952...
793
; ASK GRAPHICS MODE
952
; ASK GRAPHICS MODE
Line 794... Line 953...
794
 
953
 
795
        call    set_vmode
954
        call    set_vmode
796
 
955
 
Line 797... Line 956...
797
; GRAPHICS ACCELERATION
956
; GRAPHICS ACCELERATION
Line 798... Line 957...
798
; force yes
957
; force yes
799
        mov     [es:0x901C], byte 1
958
        mov     [es:BOOT_MTRR], byte 1
Line 800... Line 959...
800
 
959
 
801
; DMA ACCESS TO HD
960
; DMA ACCESS TO HD
802
 
961
 
803
        mov     al, [preboot_dma]
962
        mov     al, [preboot_dma]
804
        mov     [es:0x901F], al
-
 
Line 805... Line 963...
805
 
963
        mov     [es:BOOT_DMA], al
Line 806... Line 964...
806
; VRR_M USE
964
 
807
 
965
;; VRR_M USE
Line 965... Line 1123...
965
        jz      @f
1123
        jz      @f
966
sayerr_floppy:
1124
sayerr_floppy:
967
        mov     dx, 0x3f2
1125
        mov     dx, 0x3f2
968
        mov     al, 0
1126
        mov     al, 0
969
        out     dx, al
1127
        out     dx, al
-
 
1128
sayerr_memmove:
970
        mov     si, memmovefailed
1129
        mov     si, memmovefailed
971
        jmp     sayerr_plain
1130
        jmp     sayerr_plain
972
@@:
1131
@@:
973
        pop     ax                      ; restore from stack count of words in boot+FAT
1132
        pop     ax                      ; restore from stack count of words in boot+FAT
974
        shl     ax, 1                   ; make bytes count from count of words
1133
        shl     ax, 1                   ; make bytes count from count of words
Line 1143... Line 1302...
1143
        int     0x13
1302
        int     0x13
1144
        mov     dx, 0x3f2       ; floppy motor off
1303
        mov     dx, 0x3f2       ; floppy motor off
1145
        mov     al, 0
1304
        mov     al, 0
1146
        out     dx, al
1305
        out     dx, al
Line -... Line 1306...
-
 
1306
 
-
 
1307
if defined extended_primary_loader
-
 
1308
        cmp     [boot_dev], 1
-
 
1309
        jne     no_sys_from_primary
-
 
1310
; load kolibri.img using callback from primary loader
-
 
1311
        and     word [movedesc + 24 + 2], 0
-
 
1312
        mov     byte [movedesc + 24 + 4], 10h
-
 
1313
; read in blocks of 64K until file is fully loaded
-
 
1314
        mov     ax, 1
-
 
1315
.repeat:
-
 
1316
        mov     di, image_file_struct
-
 
1317
        call    [bootcallback]
-
 
1318
        push    cs
-
 
1319
        pop     ds
-
 
1320
        push    cs
-
 
1321
        pop     es
-
 
1322
        cmp     bx, 1
-
 
1323
        ja      sayerr_badsect
-
 
1324
        push    bx
-
 
1325
        mov     si, movedesc
-
 
1326
        and     word [si + 16 + 2], 0
-
 
1327
        mov     byte [si + 16 + 4], 4
-
 
1328
        mov     ah, 87h
-
 
1329
        mov     cx, 8000h
-
 
1330
        int     15h
-
 
1331
        pop     bx
-
 
1332
        test    ah, ah
-
 
1333
        jnz     sayerr_memmove
-
 
1334
        inc     byte [si + 24 + 4]
-
 
1335
        test    bx, bx
-
 
1336
        jz      no_sys_from_primary
-
 
1337
        mov     ax, 2
-
 
1338
        jmp     .repeat
-
 
1339
no_sys_from_primary:
Line 1147... Line 1340...
1147
 
1340
end if
Line 1148... Line 1341...
1148
 
1341
 
1149
; SET GRAPHICS
1342
; SET GRAPHICS