学生時代に書いた OS になったはずの起点のソースコードです。(その授業は一応合格できました。)
修訂 | 5984740ce455e3f08fa4cc3a8f4c4bbf5f092e23 (tree) |
---|---|
時間 | 2013-07-08 13:59:00 |
作者 | Joel Matthew Rees <reiisi@user...> |
Commiter | Joel Matthew Rees |
This was the point at which the functionality was sufficient to pass the class.
I wanted to add disk IO and build a FORTH around it, but I lost my way getting the FORTH running.
@@ -170,11 +170,11 @@ | ||
170 | 170 | 02510 WLCOL EQU *-WINTBL |
171 | 171 | 02520 FCB 0 |
172 | 172 | 02530 WWCOL EQU *-WINTBL |
173 | -02540 FCB 31 | |
173 | +02540 FCB 12 | |
174 | 174 | 02550 WTROW EQU *-WINTBL |
175 | -02560 FCB 1 | |
175 | +02560 FCB 0 | |
176 | 176 | 02570 WLROW EQU *-WINTBL |
177 | -02580 FCB 15 | |
177 | +02580 FCB 5 | |
178 | 178 | 02590 WCURCL EQU *-WINTBL |
179 | 179 | 02600 FCB 0 |
180 | 180 | 02610 WCURRW EQU *-WINTBL |
@@ -189,7 +189,7 @@ | ||
189 | 189 | 02709 * CLOCK WINDOW |
190 | 190 | 02710 FCB 2 |
191 | 191 | 02711 FCB 13 |
192 | -02712 FCB 31 | |
192 | +02712 FCB 18 | |
193 | 193 | 02713 FCB 0 |
194 | 194 | 02714 FCB 0 |
195 | 195 | 02715 FCB 0 |
@@ -198,6 +198,18 @@ | ||
198 | 198 | 02718 FCB 0 |
199 | 199 | 02719 FCB 0 |
200 | 200 | 02720 * |
201 | +02721 * TEST WINDOW | |
202 | +02722 FCB 2 | |
203 | +02723 FCB 0 | |
204 | +02724 FCB 31 | |
205 | +02725 FCB 6 | |
206 | +02726 FCB 9 | |
207 | +02727 FCB 0 | |
208 | +02728 FCB 0 | |
209 | +02729 FCB $8F | |
210 | +02730 FCB 0 | |
211 | +02731 FCB $83 | |
212 | +02732 * | |
201 | 213 | 02890 RMB (NUMWIN-2)*WINSIZ |
202 | 214 | 02900 KSTACO FDB 0 |
203 | 215 | 02910 RMB $100 KERNEL'S STACK |
@@ -713,10 +725,10 @@ | ||
713 | 725 | 21780 DEC ,S WHOLE CT |
714 | 726 | 21790 BGT USPLRL |
715 | 727 | 21800 * NOW PARTIAL SCROLL LAST |
716 | -21810 USPLPS LDA WCURCL,Y | |
728 | +21805 USPLPS LDB #VSPACE | |
729 | +21810 LDA WCURCL,Y | |
717 | 730 | 21820 BEQ USPLCE |
718 | 731 | 21830 STA ,S |
719 | -21840 LDB #VSPACE | |
720 | 732 | 21850 USPLPL LDA SCRWID,X |
721 | 733 | 21860 STB SCRWID,X |
722 | 734 | 21870 STA ,X+ |
@@ -738,24 +750,23 @@ | ||
738 | 750 | 22030 CMPA #$20 |
739 | 751 | 22040 BHS VPUTVC |
740 | 752 | 22050 ASLA CTL FN |
741 | -22060 LEAY CTLTBL,PCR | |
753 | +22060 LEAX CTLTBL,PCR | |
742 | 754 | 22070 JSR [A,X] |
743 | 755 | 22080 BRA VPUTQT |
744 | 756 | 22090 * PUT VISIBLE CHARACTER |
745 | -22100 VPUTVC PSHS A | |
757 | +22100 VPUTVC PSHU A | |
746 | 758 | 22110 LBSR VITRAN |
747 | 759 | 22120 PULU A |
748 | 760 | 22130 LDX ,U |
749 | 761 | 22140 LBSR IXCRSR |
750 | 762 | 22150 STA [,U++] |
751 | -22160 LDA WCURCL,X | |
752 | -22170 INCA | |
763 | +22160 INC WCURCL,X | |
764 | +22170 LDA WCURCL,X | |
753 | 765 | 22180 CMPA WWCOL,X |
754 | 766 | 22190 BLS VPUTQT |
755 | -22200 CLRA | |
756 | -22210 STA WCURCL,X | |
757 | -22220 LDA WCURRW,X | |
758 | -22230 INCA | |
767 | +22210 CLR WCURCL,X | |
768 | +22220 INC WCURRW,X | |
769 | +22230 LDA WCURRW,X | |
759 | 770 | 22240 CMPA WLROW,X |
760 | 771 | 22250 BLS VPUTQT |
761 | 772 | 22260 PSHU X |
@@ -776,7 +787,7 @@ | ||
776 | 787 | 22410 FDB VNUL |
777 | 788 | 22420 FDB VNUL |
778 | 789 | 22430 FDB VFF |
779 | -22440 FDB VNUL | |
790 | +22440 FDB VCR | |
780 | 791 | 22450 FDB VNUL |
781 | 792 | 22460 FDB VNUL |
782 | 793 | 22470 FDB VNUL |
@@ -804,7 +815,7 @@ | ||
804 | 815 | 22690 VBEL PSHS A |
805 | 816 | 22700 LEAU 2,U |
806 | 817 | 22710 LDA BEEP |
807 | -22720 ADDA #6 | |
818 | +22720 ADDA #30 | |
808 | 819 | 22730 STA BEEP |
809 | 820 | 22740 PULS A,PC |
810 | 821 | 22750 * |
@@ -818,6 +829,7 @@ | ||
818 | 829 | 22830 DEC WCURRW,X |
819 | 830 | 22840 BPL VBSNW |
820 | 831 | 22850 CLR WCURRW,X |
832 | +22855 CLR WCURCL,X | |
821 | 833 | 22860 VBSNW LBSR IXCRSR |
822 | 834 | 22870 LDA #VSPACE |
823 | 835 | 22880 STA [,U++] |
@@ -830,7 +842,7 @@ | ||
830 | 842 | 22950 PULU X |
831 | 843 | 22960 CLR WCURRW,Y |
832 | 844 | 22970 CLR WCURCL,Y |
833 | -22980 LDB #SCRWID | |
845 | +22980 LDB #SCRWID-1 | |
834 | 846 | 22990 SUBB WWCOL,Y |
835 | 847 | 23000 LDA WLROW,Y |
836 | 848 | 23010 PSHS A,B |
@@ -846,6 +858,27 @@ | ||
846 | 858 | 23110 LEAS 2,S |
847 | 859 | 23120 PULS A,B,X,Y,PC |
848 | 860 | 23130 * |
861 | +23140 * CLEAR TO END, FEED/HOME | |
862 | +23150 VCR PSHS A,B,X,Y | |
863 | +23160 LDY ,U | |
864 | +23170 LBSR IXCRSR | |
865 | +23180 PULU X | |
866 | +23190 LDA #VSPACE | |
867 | +23200 LDB WWCOL,Y | |
868 | +23210 SUBB WCURCL,Y | |
869 | +23220 BLO VCRDUN | |
870 | +23230 VCRLUP STA ,X+ | |
871 | +23240 DECB | |
872 | +23250 BPL VCRLUP | |
873 | +23260 CLR WCURCL,Y | |
874 | +23270 INC WCURRW,Y | |
875 | +23280 LDA WCURRW,Y | |
876 | +23290 CMPA WLROW,Y | |
877 | +23300 BLS VCRDUN | |
878 | +23310 PSHU Y | |
879 | +23320 LBSR USPLIT | |
880 | +23330 VCRDUN PULS A,B,X,Y,PC | |
881 | +23340 * | |
849 | 882 | 50000 O EQU * |
850 | 883 | 50010 * STARTUP CODE |
851 | 884 | 50020 * INTIALIZE PORTS |
@@ -883,18 +916,14 @@ | ||
883 | 916 | 50350 TFR Y,D |
884 | 917 | 50360 TFR A,DP |
885 | 918 | 50370 SETDP SYSGLO/256 |
886 | -50380 LDX #$400 | |
887 | 919 | 50390 WAITIQ CLR ,-U WINDOW 0 |
888 | 920 | 50410 LBSR GETKEY |
889 | -50411 LDA ,U | |
921 | +50411 PULU A | |
890 | 922 | 50412 CMPA #3 |
891 | 923 | 50413 BEQ IQDONE |
892 | -50419 LBSR VITRAN | |
893 | -50420 PULU A | |
894 | -50430 STA ,X+ | |
895 | -50440 CMPX #$600 | |
896 | -50450 BLO *+5 | |
897 | -50460 LDX #$400 | |
924 | +50420 CLRB | |
925 | +50430 PSHU A,B | |
926 | +50440 LBSR VPUTCH | |
898 | 927 | 50480 BRA WAITIQ |
899 | 928 | 50485 IQDONE ORCC #IRQMSK |
900 | 929 | 50490 LDA KEYCOL+1 |
@@ -916,4 +945,3 @@ | ||
916 | 945 | 56040 IDLLIM EQU * |
917 | 946 | 56050 * |
918 | 947 | 62000 END |
919 | - | |
\ No newline at end of file |