mirror of
https://github.com/antoinevignau/source.git
synced 2026-04-26 11:30:40 +00:00
v0.5
This commit is contained in:
Binary file not shown.
Binary file not shown.
+76
-10
@@ -27,7 +27,7 @@ COUT = $FDED
|
||||
|
||||
*-------------- EQUATES
|
||||
|
||||
VERSION = 4 ; v0.x
|
||||
VERSION = 5 ; v0.x
|
||||
|
||||
T = 0
|
||||
T1 = 1
|
||||
@@ -64,30 +64,34 @@ loopTEST @printSTRING #strMENU
|
||||
@printSTRING #strGOODBYE
|
||||
rts
|
||||
|
||||
noTEST0 cmp #"1"
|
||||
noTEST0 cmp #"1" ; set slot
|
||||
bne noTEST1
|
||||
jmp doSETSLOT
|
||||
|
||||
noTEST1 cmp #"2"
|
||||
noTEST1 cmp #"2" ; T1 one-shot
|
||||
bne noTEST2
|
||||
jmp doONESHOTT1
|
||||
|
||||
noTEST2 cmp #"3"
|
||||
noTEST2 cmp #"3" ; T1 loop
|
||||
bne noTEST3
|
||||
jmp doLOOPT1
|
||||
|
||||
noTEST3 cmp #"4"
|
||||
noTEST3 cmp #"4" ; set frequency
|
||||
bne noTEST4
|
||||
jmp doSETFREQ
|
||||
|
||||
noTEST4 cmp #"5"
|
||||
noTEST4 cmp #"5" ; T2 one-shot
|
||||
bne noTEST5
|
||||
jmp doONESHOTT2
|
||||
|
||||
noTEST5 cmp #"6"
|
||||
bne loopTEST
|
||||
noTEST5 cmp #"6" ; T2 loop
|
||||
bne noTEST6
|
||||
jmp doLOOPT2
|
||||
|
||||
noTEST6 cmp #"7"
|
||||
bne loopTEST
|
||||
jmp doSTATUS
|
||||
|
||||
*-------------- SET SLOT
|
||||
|
||||
doSETSLOT @printSTRING #strSETSLOT
|
||||
@@ -121,7 +125,46 @@ doSETFREQ @printSTRING #strSETFREQ
|
||||
sta theFREQ
|
||||
jsr setT2FREQUENCY
|
||||
jmp loopTEST
|
||||
|
||||
|
||||
*-------------- STATUS
|
||||
|
||||
doSTATUS jsr readSTATUS
|
||||
|
||||
*--- Timers status
|
||||
|
||||
pha
|
||||
bpl doSTATUS1 ; T1 is off
|
||||
@printSTRING #strT1ON
|
||||
jmp doSTATUS2
|
||||
doSTATUS1 @printSTRING #strT1OFF
|
||||
|
||||
doSTATUS2 pla
|
||||
asl
|
||||
bpl doSTATUS3 ; T1 is off
|
||||
@printSTRING #strT2ON
|
||||
jmp doSTATUS4
|
||||
doSTATUS3 @printSTRING #strT2OFF
|
||||
|
||||
*--- Frequency
|
||||
|
||||
doSTATUS4 @printSTRING #strT2FREQ
|
||||
|
||||
jsr readFREQUENCY
|
||||
and #%1100_0000
|
||||
cmp #%0000_0000
|
||||
bne doSTATUS5
|
||||
@printSTRING #strT2FREQ0
|
||||
|
||||
doSTATUS5 cmp #%0100_0000
|
||||
bne doSTATUS6
|
||||
@printSTRING #strT2FREQ1
|
||||
|
||||
doSTATUS6 cmp #%1000_0000
|
||||
bne doSTATUS7
|
||||
@printSTRING #strT2FREQ2
|
||||
|
||||
doSTATUS7 jmp loopTEST
|
||||
|
||||
*-------------- ONE SHOT
|
||||
|
||||
ds \
|
||||
@@ -147,7 +190,8 @@ doLOOPT1 lda #T1
|
||||
bne doLOOP
|
||||
doLOOPT2 lda #T2
|
||||
|
||||
doLOOP jsr resetTIMER
|
||||
doLOOP sta theTIMER
|
||||
jsr resetTIMER
|
||||
|
||||
lda #0
|
||||
sta theLOOP
|
||||
@@ -217,6 +261,18 @@ setT2FREQUENCY ldx theSLOT16
|
||||
sta $c084,x
|
||||
rts
|
||||
|
||||
*------- Read TIMER status
|
||||
|
||||
readSTATUS ldx theSLOT16
|
||||
lda $c081,x
|
||||
rts
|
||||
|
||||
*------- Read TIMER frequency
|
||||
|
||||
readFREQUENCY ldx theSLOT16
|
||||
lda $c084,x
|
||||
rts
|
||||
|
||||
*------- Print timer value
|
||||
|
||||
printTIMER2 @printSTRING #strTIMER2
|
||||
@@ -322,4 +378,14 @@ strSETFREQ asc 8d
|
||||
asc "3- Set 3.5 MHz"8d
|
||||
asc "Set frequency (1-3) > "00
|
||||
|
||||
strT1ON asc 8d"Timer 1 is on"00
|
||||
strT1OFF asc 8d"Timer 1 is off"00
|
||||
strT2ON asc 8d"Timer 2 is on"00
|
||||
strT2OFF asc 8d"Timer 2 is off"00
|
||||
|
||||
strT2FREQ asc 8d"Timer 2 frequency is: "00
|
||||
strT2FREQ0 asc "1 MHz"00
|
||||
strT2FREQ1 asc "1.xx MHz"00
|
||||
strT2FREQ2 asc "3.5 Mhz"00
|
||||
|
||||
strGOODBYE asc 8d"Good bye!"00
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,42 +6,61 @@ Segment1;84;brutaltimer.s;75;00/202E;noTEST2;Code;;2;11;
|
||||
Segment1;88;brutaltimer.s;79;00/2035;noTEST3;Code;;2;11;
|
||||
Segment1;92;brutaltimer.s;83;00/203C;noTEST4;Code;;2;11;
|
||||
Segment1;96;brutaltimer.s;87;00/2043;noTEST5;Code;;2;11;
|
||||
Segment1;102;brutaltimer.s;93;00/204A;doSETSLOT;Code;;2;11;
|
||||
Segment1;124;brutaltimer.s;112;00/206C;doSETFREQ;Code;;2;11;
|
||||
Segment1;144;brutaltimer.s;129;00/2100;doONESHOTT1;Code;;2;11;
|
||||
Segment1;146;brutaltimer.s;131;00/2104;doONESHOTT2;Code;;2;11;
|
||||
Segment1;148;brutaltimer.s;133;00/2106;doONESHOT;Code;;3;11;
|
||||
Segment1;161;brutaltimer.s;146;00/2200;doLOOPT1;Code;;2;11;
|
||||
Segment1;163;brutaltimer.s;148;00/2204;doLOOPT2;Code;;2;11;
|
||||
Segment1;165;brutaltimer.s;150;00/2206;doLOOP;Code;;3;11;
|
||||
Segment1;170;brutaltimer.s;155;00/220E;ozunid_1;Code;;3;11;
|
||||
Segment1;194;brutaltimer.s;177;00/2300;doTEST;Code;;1;11;
|
||||
Segment1;402;brutaltimer.s;187;00/2400;resetTIMER;Code;;3;11;
|
||||
Segment1;409;brutaltimer.s;194;00/240A;startTIMER;Code;;3;11;
|
||||
Segment1;416;brutaltimer.s;201;00/2414;pauseTIMER;Code;;3;11;
|
||||
Segment1;423;brutaltimer.s;208;00/241E;stopTIMER;Code;;3;11;
|
||||
Segment1;430;brutaltimer.s;215;00/2428;setT2FREQUENCY;Code;;3;11;
|
||||
Segment1;437;brutaltimer.s;222;00/2432;printTIMER2;Code;;2;11;
|
||||
Segment1;443;brutaltimer.s;225;00/243C;printTIMER;Code;;2;11;
|
||||
Segment1;448;brutaltimer.s;227;00/2443;printTIMER1;Code;;3;11;
|
||||
Segment1;468;brutaltimer.s;247;00/2473;strTHELOOP;Data;asc;8;11;
|
||||
Segment1;469;brutaltimer.s;248;00/247B;strTIMER2;Data;asc;11;11;
|
||||
Segment1;470;brutaltimer.s;249;00/2486;strTIMER;Data;asc;9;11;
|
||||
Segment1;471;brutaltimer.s;250;00/248F;valTIMER;Data;ds;4;11;
|
||||
Segment1;475;brutaltimer.s;254;00/2493;printSTRING;Code;;3;11;
|
||||
Segment1;478;brutaltimer.s;257;00/2499;printSTRING1;Code;;3;11;
|
||||
Segment1;487;brutaltimer.s;266;00/24AB;printSTRING2;Code;;1;11;
|
||||
Segment1;490;brutaltimer.s;269;00/24AE;printSTRING3;Code;;3;11;
|
||||
Segment1;499;brutaltimer.s;278;00/24C0;printSTRING4;Code;;1;11;
|
||||
Segment1;503;brutaltimer.s;282;00/24C1;gotoxy;Code;;2;11;
|
||||
Segment1;509;brutaltimer.s;288;00/24C7;waitFORKEY;Code;;3;11;
|
||||
Segment1;516;brutaltimer.s;295;00/24D0;theTIMER;Data;ds;1;11;
|
||||
Segment1;517;brutaltimer.s;296;00/24D1;theFREQ;Data;ds;1;11;
|
||||
Segment1;518;brutaltimer.s;297;00/24D2;theLOOP;Data;ds;1;11;
|
||||
Segment1;519;brutaltimer.s;298;00/24D3;theSLOT;Data;ds;1;11;
|
||||
Segment1;520;brutaltimer.s;299;00/24D4;theSLOT16;Data;ds;1;11;
|
||||
Segment1;522;brutaltimer.s;301;00/24D5;strHELLO;Data;asc;23;11;
|
||||
Segment1;528;brutaltimer.s;307;00/2520;strMENU;Data;asc;1;11;
|
||||
Segment1;537;brutaltimer.s;316;00/25A9;strSETSLOT;Data;asc;1;11;
|
||||
Segment1;540;brutaltimer.s;319;00/25BC;strSETFREQ;Data;asc;1;11;
|
||||
Segment1;546;brutaltimer.s;325;00/2600;strGOODBYE;Data;asc;11;11;
|
||||
Segment1;100;brutaltimer.s;91;00/204A;noTEST6;Code;;2;11;
|
||||
Segment1;106;brutaltimer.s;97;00/2051;doSETSLOT;Code;;2;11;
|
||||
Segment1;128;brutaltimer.s;116;00/2073;doSETFREQ;Code;;2;11;
|
||||
Segment1;146;brutaltimer.s;131;00/2091;doSTATUS;Code;;3;11;
|
||||
Segment1;157;brutaltimer.s;139;00/20A1;doSTATUS1;Code;;2;11;
|
||||
Segment1;162;brutaltimer.s;141;00/20A8;doSTATUS2;Code;;1;11;
|
||||
Segment1;170;brutaltimer.s;146;00/20B6;doSTATUS3;Code;;2;11;
|
||||
Segment1;177;brutaltimer.s;150;00/20BD;doSTATUS4;Code;;2;11;
|
||||
Segment1;191;brutaltimer.s;158;00/20D4;doSTATUS5;Code;;2;11;
|
||||
Segment1;198;brutaltimer.s;162;00/20DF;doSTATUS6;Code;;2;11;
|
||||
Segment1;205;brutaltimer.s;166;00/20EA;doSTATUS7;Code;;3;11;
|
||||
Segment1;211;brutaltimer.s;172;00/2100;doONESHOTT1;Code;;2;11;
|
||||
Segment1;213;brutaltimer.s;174;00/2104;doONESHOTT2;Code;;2;11;
|
||||
Segment1;215;brutaltimer.s;176;00/2106;doONESHOT;Code;;3;11;
|
||||
Segment1;228;brutaltimer.s;189;00/2200;doLOOPT1;Code;;2;11;
|
||||
Segment1;230;brutaltimer.s;191;00/2204;doLOOPT2;Code;;2;11;
|
||||
Segment1;232;brutaltimer.s;193;00/2206;doLOOP;Code;;3;11;
|
||||
Segment1;238;brutaltimer.s;199;00/2211;ozunid_1;Code;;3;11;
|
||||
Segment1;262;brutaltimer.s;221;00/2300;doTEST;Code;;1;11;
|
||||
Segment1;470;brutaltimer.s;231;00/2400;resetTIMER;Code;;3;11;
|
||||
Segment1;477;brutaltimer.s;238;00/240A;startTIMER;Code;;3;11;
|
||||
Segment1;484;brutaltimer.s;245;00/2414;pauseTIMER;Code;;3;11;
|
||||
Segment1;491;brutaltimer.s;252;00/241E;stopTIMER;Code;;3;11;
|
||||
Segment1;498;brutaltimer.s;259;00/2428;setT2FREQUENCY;Code;;3;11;
|
||||
Segment1;505;brutaltimer.s;266;00/2432;readSTATUS;Code;;3;11;
|
||||
Segment1;511;brutaltimer.s;272;00/2439;readFREQUENCY;Code;;3;11;
|
||||
Segment1;517;brutaltimer.s;278;00/2440;printTIMER2;Code;;2;11;
|
||||
Segment1;523;brutaltimer.s;281;00/244A;printTIMER;Code;;2;11;
|
||||
Segment1;528;brutaltimer.s;283;00/2451;printTIMER1;Code;;3;11;
|
||||
Segment1;548;brutaltimer.s;303;00/2481;strTHELOOP;Data;asc;8;11;
|
||||
Segment1;549;brutaltimer.s;304;00/2489;strTIMER2;Data;asc;11;11;
|
||||
Segment1;550;brutaltimer.s;305;00/2494;strTIMER;Data;asc;9;11;
|
||||
Segment1;551;brutaltimer.s;306;00/249D;valTIMER;Data;ds;4;11;
|
||||
Segment1;555;brutaltimer.s;310;00/24A1;printSTRING;Code;;3;11;
|
||||
Segment1;558;brutaltimer.s;313;00/24A7;printSTRING1;Code;;3;11;
|
||||
Segment1;567;brutaltimer.s;322;00/24B9;printSTRING2;Code;;1;11;
|
||||
Segment1;570;brutaltimer.s;325;00/24BC;printSTRING3;Code;;3;11;
|
||||
Segment1;579;brutaltimer.s;334;00/24CE;printSTRING4;Code;;1;11;
|
||||
Segment1;583;brutaltimer.s;338;00/24CF;gotoxy;Code;;2;11;
|
||||
Segment1;589;brutaltimer.s;344;00/24D5;waitFORKEY;Code;;3;11;
|
||||
Segment1;596;brutaltimer.s;351;00/24DE;theTIMER;Data;ds;1;11;
|
||||
Segment1;597;brutaltimer.s;352;00/24DF;theFREQ;Data;ds;1;11;
|
||||
Segment1;598;brutaltimer.s;353;00/24E0;theLOOP;Data;ds;1;11;
|
||||
Segment1;599;brutaltimer.s;354;00/24E1;theSLOT;Data;ds;1;11;
|
||||
Segment1;600;brutaltimer.s;355;00/24E2;theSLOT16;Data;ds;1;11;
|
||||
Segment1;602;brutaltimer.s;357;00/24E3;strHELLO;Data;asc;23;11;
|
||||
Segment1;608;brutaltimer.s;363;00/252E;strMENU;Data;asc;1;11;
|
||||
Segment1;617;brutaltimer.s;372;00/25B7;strSETSLOT;Data;asc;1;11;
|
||||
Segment1;620;brutaltimer.s;375;00/25CA;strSETFREQ;Data;asc;1;11;
|
||||
Segment1;626;brutaltimer.s;381;00/260E;strT1ON;Data;asc;16;11;
|
||||
Segment1;627;brutaltimer.s;382;00/261E;strT1OFF;Data;asc;16;11;
|
||||
Segment1;628;brutaltimer.s;383;00/262E;strT2ON;Data;asc;16;11;
|
||||
Segment1;629;brutaltimer.s;384;00/263E;strT2OFF;Data;asc;16;11;
|
||||
Segment1;631;brutaltimer.s;386;00/264E;strT2FREQ;Data;asc;24;11;
|
||||
Segment1;632;brutaltimer.s;387;00/2666;strT2FREQ0;Data;asc;6;11;
|
||||
Segment1;633;brutaltimer.s;388;00/266C;strT2FREQ1;Data;asc;9;11;
|
||||
Segment1;634;brutaltimer.s;389;00/2675;strT2FREQ2;Data;asc;8;11;
|
||||
Segment1;636;brutaltimer.s;391;00/267D;strGOODBYE;Data;asc;11;11;
|
||||
|
||||
Reference in New Issue
Block a user