Немига 405 boot 02A-MD

Материал из Emuverse

Загрузка на Немиге 4.05

В дисководе MD0: вставлена дискета 02A-MD.DSK.

Запускаем машину, она загружается в Пульт, пользователь вводит команду D.

Работа загрузчика с диска, код в ПЗУ:

161654 -- Команда 'D' -- загрузка с диска
163026 -- Мы на 0-й дорожке, читаем первый сектор: в первом секторе записано количество секторов в каждой дорожке
Floppy0 READ 17 POS0010 SC00 TR00
163050 -- Получаем количество секторов на 0-й дорожке (это 23.)
читаем весь остаток 0-й дорожки
Floppy0 READ a0 POS0140 SC01 TR00
Floppy0 READ 3e POS0270 SC02 TR00
Floppy0 READ 83 POS0400 SC03 TR00
Floppy0 READ fe POS0530 SC04 TR00
Floppy0 READ 00 POS0660 SC05 TR00
Floppy0 READ ff POS0790 SC06 TR00
Floppy0 READ ff POS0920 SC07 TR00
Floppy0 READ ff POS1050 SC08 TR00
Floppy0 READ 1f POS1180 SC09 TR00
Floppy0 READ 19 POS1310 SC10 TR00
Floppy0 READ 00 POS1440 SC11 TR00
Floppy0 READ 59 POS1570 SC12 TR00
Floppy0 READ 42 POS1700 SC13 TR00
Floppy0 READ 45 POS1830 SC14 TR00
Floppy0 READ 81 POS1960 SC15 TR00
Floppy0 READ f4 POS2090 SC16 TR00
Floppy0 READ f4 POS2220 SC17 TR00
Floppy0 READ b6 POS2350 SC18 TR00
Floppy0 READ 4a POS2480 SC19 TR00
Floppy0 READ 01 POS2610 SC20 TR00
Floppy0 READ 04 POS2740 SC21 TR00
Floppy0 READ 32 POS2870 SC22 TR00

выходим из подпрограммы чтения
161670: MOV	#000200, @#177766
161676: CLR	PC			; Запуск полученного блока с адреса 000000

Работа начального загрузчика MD BOOT:

000000: NOP	
000002: BR	000024

Очищается экран и выводится надпись "MD BOOT    V02.02(#)"

Floppy0 COMMAND 000070
Floppy0 SET STATE 1 OPER 000060
Floppy0 STEP IN
Floppy0 PREPARE TRACK 1
Floppy0 COMMAND 000030
Floppy0 SET STATE 1 OPER 000020
Floppy0 STEP OUT
Floppy0 PREPARE TRACK 0
Floppy TRACK 00
Floppy0 COMMAND 000010
Floppy0 SET STATE 1 OPER 000000
Floppy0 READ 17 POS0010 SC00 TR00
Floppy0 SET STATE 0 OPER 000000
Floppy0 COMMAND 000010
Floppy0 SET STATE 1 OPER 000000

Чтение 0-й дорожки:
Floppy0 READ 17 POS0010 SC00 TR00
Floppy0 READ a0 POS0140 SC01 TR00
Floppy0 READ 3e POS0270 SC02 TR00
Floppy0 READ 83 POS0400 SC03 TR00
Floppy0 READ fe POS0530 SC04 TR00
Floppy0 READ 00 POS0660 SC05 TR00
Floppy0 READ ff POS0790 SC06 TR00
Floppy0 READ ff POS0920 SC07 TR00
Floppy0 READ ff POS1050 SC08 TR00
Floppy0 READ 1f POS1180 SC09 TR00
Floppy0 READ 19 POS1310 SC10 TR00
Floppy0 READ 00 POS1440 SC11 TR00
Floppy0 READ 59 POS1570 SC12 TR00
Floppy0 READ 42 POS1700 SC13 TR00
Floppy0 READ 45 POS1830 SC14 TR00
Floppy0 READ 81 POS1960 SC15 TR00
Floppy0 READ f4 POS2090 SC16 TR00
Floppy0 READ f4 POS2220 SC17 TR00
Floppy0 READ b6 POS2350 SC18 TR00
Floppy0 READ 4a POS2480 SC19 TR00
Floppy0 READ 01 POS2610 SC20 TR00
Floppy0 READ 04 POS2740 SC21 TR00
Floppy0 READ 32 POS2870 SC22 TR00

Floppy0 SET STATE 0 OPER 000000
Floppy0 COMMAND 000070
Floppy0 SET STATE 1 OPER 000060
Floppy0 STEP IN
Floppy0 PREPARE TRACK 1
Floppy0 COMMAND 000010
Floppy0 SET STATE 1 OPER 000000

Чтение 1-й дорожки:
Floppy0 READ 6c POS0010 SC00 TR01
Floppy0 READ 0d POS0140 SC01 TR01
Floppy0 READ 03 POS0270 SC02 TR01
Floppy0 READ bb POS0400 SC03 TR01
Floppy0 READ 04 POS0530 SC04 TR01
Floppy0 READ 00 POS0660 SC05 TR01
Floppy0 READ 35 POS0790 SC06 TR01
Floppy0 READ ff POS0920 SC07 TR01
Floppy0 READ ff POS1050 SC08 TR01
Floppy0 READ ff POS1180 SC09 TR01
Floppy0 READ 00 POS1310 SC10 TR01
Floppy0 READ 00 POS1440 SC11 TR01
Floppy0 READ 00 POS1570 SC12 TR01
Floppy0 READ 00 POS1700 SC13 TR01
Floppy0 READ 00 POS1830 SC14 TR01
Floppy0 READ 00 POS1960 SC15 TR01
Floppy0 READ 00 POS2090 SC16 TR01
Floppy0 READ 00 POS2220 SC17 TR01
Floppy0 READ 00 POS2350 SC18 TR01
Floppy0 READ 00 POS2480 SC19 TR01
Floppy0 READ 00 POS2610 SC20 TR01
Floppy0 READ 00 POS2740 SC21 TR01
Floppy0 READ 00 POS2870 SC22 TR01

Затем идём и читаем дорожки 59, 60, 61.