• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubybathyscaphegamephpguicwindows翻訳pythonomegattwitterframeworkbtronarduinovb.net計画中(planning stage)directxpreviewertestゲームエンジンdom

学生時代に書いた OS になったはずの起点のソースコードです。(その授業は一応合格できました。)


Commit MetaInfo

Revisiondbae67a49d0bb6ac38c6146d1495601739010527 (tree)
Time2013-07-08 13:52:10
AuthorJoel Matthew Rees <reiisi@user...>
CommiterJoel Matthew Rees

Log Message

This would have been where I got some windowing functionality running. (Textmode only.)

Change Summary

  • delete: OSKEY5RP.AS9 => OSWIND2.AS9

Incremental Difference

--- a/OSKEY5RP.AS9
+++ b/OSWIND2.AS9
@@ -1,4 +1,4 @@
1-00080 ORG $4000
1+00080 ORG $5000
22 00090 SYSGLO EQU *
33 00100 * SYSGLO MUST BE ON EVEN PAGE (256 BYTE) BOUNDARY
44 00105 IVSAVE RMB 2 IRQ VECTOR FOR RETURN TO EDTASM
@@ -166,15 +166,15 @@
166166 02500 NUMWIN EQU 8
167167 02502 WINTBL EQU *
168168 02504 WSCR EQU *-WINTBL
169-02506 FCB 2
169+02506 FCB 2 CONSOLE
170170 02510 WLCOL EQU *-WINTBL
171-02520 FCB 13
172-02530 WRCOL EQU *-WINTBL
171+02520 FCB 0
172+02530 WWCOL EQU *-WINTBL
173173 02540 FCB 31
174174 02550 WTROW EQU *-WINTBL
175-02560 FCB 0
176-02570 WBROW EQU *-WINTBL
177-02580 FCB 0
175+02560 FCB 1
176+02570 WLROW EQU *-WINTBL
177+02580 FCB 15
178178 02590 WCURCL EQU *-WINTBL
179179 02600 FCB 0
180180 02610 WCURRW EQU *-WINTBL
@@ -186,7 +186,19 @@
186186 02670 WCSTAT EQU *-WINTBL B7=DISPLAY B6-B0=COUNT
187187 02680 FCB $8F
188188 02700 WINSIZ EQU *-WINTBL
189-02710 RMB (NUMWIN-1)*WINSIZ
189+02709 * CLOCK WINDOW
190+02710 FCB 2
191+02711 FCB 13
192+02712 FCB 31
193+02713 FCB 0
194+02714 FCB 0
195+02715 FCB 0
196+02716 FCB 0
197+02717 FCB $8F
198+02718 FCB 0
199+02719 FCB 0
200+02720 *
201+02890 RMB (NUMWIN-2)*WINSIZ
190202 02900 KSTACO FDB 0
191203 02910 RMB $100 KERNEL'S STACK
192204 02920 KSTACK EQU *
@@ -388,9 +400,7 @@
388400 04720 BEQ KYTRDM
389401 04730 PSHU A
390402 04740 BSR KYBPUT
391-04743 KYTRDM LDA KEYRAW
392-04745 STA KEYLAS
393-04750 TST ,U MORE ROWS?
403+04750 KYTRDM TST ,U MORE ROWS?
394404 04760 BNE KYTRDL
395405 04770 PULU A,B
396406 04780 KYTRUP LEAY KEYOPN,PCR
@@ -449,8 +459,7 @@
449459 05250 BNE KYBPCH
450460 05260 STA SYSATT
451461 05270 LDA #-1
452-05275 STA KEYLAS
453-05280 BRA KYBPF NO REPEAT
462+05280 BRA KYBPF1 NO REPEAT
454463 05290 KYBPCH CMPA #KMT
455464 05300 BEQ KYBPF
456465 05310 LEAX KEYEND,PCR
@@ -466,9 +475,10 @@
466475 05410 ADDA BEEP
467476 05420 STA BEEP
468477 05430 LDA #-1
469-05435 STA KEYLAS
470-05440 BRA KYBPF
478+05440 BRA KYBPF1
471479 05450 KYBPNF STX KEYIN
480+05455 LDA KEYRAW
481+05460 KYBPF1 STA KEYLAS
472482 05470 KYBPF CLR KEYTIM
473483 05480 PULS A,X,CC,PC
474484 05490 *
@@ -575,6 +585,8 @@
575585 20520 *
576586 20530 IXCRSR PSHS A,B,X
577587 20540 LDX ,U
588+20545 PSHU X
589+20546 BSR BWIND
578590 20550 LDA WSCR,X
579591 20560 ASLA
580592 20570 PSHS A
@@ -618,6 +630,222 @@
618630 20950 VITRDF LDA #$3F INVERTED ? FOR BAD CODES
619631 20960 BRA VITRET
620632 20970 *
633+20980 * RESTORE CURSOR TO WINDOW BOUNDARIES
634+20990 BWIND PSHS A,Y
635+21000 PULU Y
636+21010 LDA WCURRW,Y
637+21020 BPL BWINRH
638+21030 CLR WCURRW,Y
639+21040 CLR WCURCL,Y
640+21050 BRA BWINQT
641+21060 BWINRH CMPA WLROW,Y
642+21070 BLS BWINCL
643+21080 LDA WLROW,Y
644+21090 STA WCURRW,Y
645+21100 LDA WWCOL,Y
646+21110 STA WCURCL,Y
647+21120 BRA BWINQT
648+21130 BWINCL LDA WCURCL,Y
649+21140 BPL BWINCH
650+21150 CLR WCURCL,Y
651+21160 BRA BWINQT
652+21170 BWINCH CMPA WWCOL,Y
653+21180 BLS BWINQT
654+21190 LDA WWCOL,Y
655+21200 STA WCURCL,Y
656+21210 BWINQT PULS A,Y,PC
657+21220 *
658+21230 * RETURN POINTER TO HOME IN WINDOW
659+21240 IXHOME PSHS A,B,X
660+21250 LDX ,U
661+21260 LDA WSCR,X
662+21270 ASLA
663+21280 PSHS A
664+21290 LDA #SCRWID
665+21300 LDB WTROW,X
666+21310 MUL
667+21320 ADDB WLCOL,X
668+21330 ADCA ,S+
669+21340 STD ,U
670+21350 PULS A,B,X,PC
671+21360 *
672+21370 * SPLIT SCREEN AND INSERT LINE AT CURSOR
673+21380 USPLIT PSHS A,B,X,Y
674+21390 LDY ,U SET UP
675+21400 BSR IXHOME
676+21410 PULU X
677+21420 LDA WCURRW,Y
678+21430 BPL *+4
679+21440 PULS A,B,X,Y,PC EARLY RETURN
680+21450 LDB #SCRWID-1
681+21460 SUBB WWCOL,Y WRAP ADJUST
682+21470 PSHS A,B
683+21480 LDB WCURCL,Y
684+21490 CMPB WWCOL,Y
685+21500 BLS USPLCF
686+21510 CLR WCURCL,Y
687+21520 INCA WRAP ROW
688+21530 USPLCF TSTA ROW 0?
689+21540 BNE USPLRT
690+21550 LDA #VSPACE
691+21560 LDB WCURCL,Y
692+21570 BEQ USPLQT
693+21580 USPLL0 STA ,X+
694+21590 DECB TO CURSOR
695+21600 BGT USPLL0
696+21610 BRA USPLQT
697+21620 * DO WHOLE ROWS
698+21630 USPLRT CMPA WLROW,Y
699+21640 BLS USPLSR
700+21650 LDA WLROW,Y
701+21660 INCA OVER END
702+21670 STA WCURRW,Y
703+21680 USPLSR DECA # SCROLL
704+21690 BEQ USPLPS
705+21700 STA ,S
706+21710 USPLRL LDB WWCOL,Y
707+21720 USPLCL LDA SCRWID,X
708+21730 STA ,X+
709+21740 DECB NATURAL
710+21750 BPL USPLCL
711+21760 LDB 1,S
712+21770 ABX WRAP LINE
713+21780 DEC ,S WHOLE CT
714+21790 BGT USPLRL
715+21800 * NOW PARTIAL SCROLL LAST
716+21810 USPLPS LDA WCURCL,Y
717+21820 BEQ USPLCE
718+21830 STA ,S
719+21840 LDB #VSPACE
720+21850 USPLPL LDA SCRWID,X
721+21860 STB SCRWID,X
722+21870 STA ,X+
723+21880 DEC ,S WHOLE CT
724+21890 BGT USPLPL
725+21900 USPLCE DEC WCURRW,Y BUMP CURSOR BACK
726+21910 LDA WWCOL,Y
727+21920 SUBA WCURCL,Y
728+21930 USPLEL STB ,X+
729+21940 DECA NATURAL
730+21950 BPL USPLEL
731+21960 USPLQT LEAS 2,S
732+21970 PULS A,B,X,Y,PC
733+21980 *
734+21990 * PUT CHARACTER ON SCREEN, TTY, WITH CONTROL CHARACTERS
735+22000 VPUTCH PSHS A,X
736+22010 PULU A
737+22020 LBSR IXWIND
738+22030 CMPA #$20
739+22040 BHS VPUTVC
740+22050 ASLA CTL FN
741+22060 LEAY CTLTBL,PCR
742+22070 JSR [A,X]
743+22080 BRA VPUTQT
744+22090 * PUT VISIBLE CHARACTER
745+22100 VPUTVC PSHS A
746+22110 LBSR VITRAN
747+22120 PULU A
748+22130 LDX ,U
749+22140 LBSR IXCRSR
750+22150 STA [,U++]
751+22160 LDA WCURCL,X
752+22170 INCA
753+22180 CMPA WWCOL,X
754+22190 BLS VPUTQT
755+22200 CLRA
756+22210 STA WCURCL,X
757+22220 LDA WCURRW,X
758+22230 INCA
759+22240 CMPA WLROW,X
760+22250 BLS VPUTQT
761+22260 PSHU X
762+22270 LBSR USPLIT
763+22280 VPUTQT PULS A,X,PC
764+22290 *
765+22300 * TABLE OF CONTROL FUNCTION POINTERS FOR PRINT ROUTINES
766+22310 CTLTBL FDB VNUL ASCII NUL
767+22320 FDB VNUL
768+22330 FDB VNUL
769+22340 FDB VNUL
770+22350 FDB VNUL
771+22360 FDB VNUL
772+22370 FDB VNUL
773+22380 FDB VBEL
774+22390 FDB VBS
775+22400 FDB VNUL
776+22410 FDB VNUL
777+22420 FDB VNUL
778+22430 FDB VFF
779+22440 FDB VNUL
780+22450 FDB VNUL
781+22460 FDB VNUL
782+22470 FDB VNUL
783+22480 FDB VNUL
784+22490 FDB VNUL
785+22500 FDB VNUL
786+22510 FDB VNUL
787+22520 FDB VNUL
788+22530 FDB VNUL
789+22540 FDB VNUL
790+22550 FDB VNUL
791+22560 FDB VNUL
792+22570 FDB VNUL
793+22580 FDB VNUL
794+22590 FDB VNUL
795+22600 FDB VNUL
796+22610 FDB VNUL
797+22620 FDB VNUL
798+22630 *
799+22640 * DO NOTHING
800+22650 VNUL LEAU 2,U
801+22660 RTS
802+22670 *
803+22680 * LOW TONE
804+22690 VBEL PSHS A
805+22700 LEAU 2,U
806+22710 LDA BEEP
807+22720 ADDA #6
808+22730 STA BEEP
809+22740 PULS A,PC
810+22750 *
811+22760 * BACK SPACE DESTRUCTIVE
812+22770 VBS PSHS A,X
813+22780 LDX ,U
814+22790 DEC WCURCL,X
815+22800 BPL VBSNW
816+22810 LDA WWCOL,X
817+22820 STA WCURCL,X
818+22830 DEC WCURRW,X
819+22840 BPL VBSNW
820+22850 CLR WCURRW,X
821+22860 VBSNW LBSR IXCRSR
822+22870 LDA #VSPACE
823+22880 STA [,U++]
824+22890 PULS A,X,PC
825+22900 *
826+22910 * CLEAR WINDOW, HOME CURSOR
827+22920 VFF PSHS A,B,X,Y
828+22930 LDY ,U
829+22940 LBSR IXHOME
830+22950 PULU X
831+22960 CLR WCURRW,Y
832+22970 CLR WCURCL,Y
833+22980 LDB #SCRWID
834+22990 SUBB WWCOL,Y
835+23000 LDA WLROW,Y
836+23010 PSHS A,B
837+23020 LDA #VSPACE
838+23030 VFFLL LDB WWCOL,Y
839+23040 VFFCL STA ,X+
840+23050 DECB
841+23060 BPL VFFCL
842+23070 LDB 1,S
843+23080 ABX
844+23090 DEC ,S
845+23100 BPL VFFLL
846+23110 LEAS 2,S
847+23120 PULS A,B,X,Y,PC
848+23130 *
621849 50000 O EQU *
622850 50010 * STARTUP CODE
623851 50020 * INTIALIZE PORTS