CASIO "DQ-2000C"

Ici, on fait dans le petit, le LCD qui déchire sa race, on y cause même calculatrices quand on est en manque !

Modérateur : Politburo

Répondre
Avatar du membre
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 292
Enregistré le : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

CASIO "DQ-2000C"

Message par Xerxes »

Some months ago my desk clock failed suddenly. I decided to replace it with a pocket instead of buying
a new one for aesthetical reason. A well suited pocket is the PB-2000C because of it's graphical screen,
the internal timer and external power supply connection.

To have access to the TM register of the HD61700 and to be fast enough for a full screen real time zoom
of the Casio font assembly language is needed:

Code : Tout sélectionner

10 CLEAR
20 A=&H0600
30 READ B$
40 IF B$="-1" GOTO 80
50 POKE A,VAL("&H"+B$)
60 A=A+1
70 GOTO 30
80 SYSTEM CALL &H0600
90 END
100 DATA 42,1D,00,CF,7A,5A,F9,56,60,15,D6,40,10,0C,21,1F
110 DATA D1,00,01,02,D0,40,00,00,FA,C2,63,5A,4C,03,0F,4C
120 DATA 04,0F,4C,05,0F,CA,03,40,C2,60,5A,1A,00,1A,01,1A
130 DATA 02,C8,40,40,C8,40,40,C8,40,40,C8,40,40,C8,60,43
140 DATA 02,75,02,02,76,01,1A,36,4E,16,0A,02,77,01,1A,17
150 DATA 4E,17,A0,02,58,D1,0F,03,02,42,13,08,02,19,DA,35
160 DATA 80,18,79,02,60,19,18,60,08,59,D6,40,1B,0E,2D,60
170 DATA 19,42,12,06,2B,05,42,11,08,DA,21,60,18,65,B1,04
180 DATA 4E,01,0F,09,31,B4,8D,98,44,98,02,98,44,98,02,42
190 DATA 11,04,96,0F,24,04,64,03,C0,64,02,C0,64,01,C0,88
200 DATA 2F,09,31,B4,92,09,32,B4,B4,09,33,B4,D0,D6,00,01
210 DATA 02,42,09,82,8F,6A,0A,42,13,02,54,00,FF,D2,09,40
220 DATA 54,00,FE,42,12,04,42,11,0C,EA,01,E0,D2,01,E0,09
230 DATA 31,B4,89,6C,00,60,09,32,B4,93,42,09,92,D6,00,61
240 DATA 02,09,33,B4,AA,FB,D6,00,5C,07,42,13,06,EA,02,80
250 DATA 17,02,9F,60,57,00,40,84,43,B0,03,DE,05,09,33,B4
260 DATA 93,1F,60,1F,61,07,41,B4,87,4C,00,3F,07,5C,B0,A9
270 DATA 02,5C,07,1C,B0,1B,47,1A,17,34,18,06,47,1B,3B,34
280 DATA 18,06,02,60,1D,48,00,3C,07,5C,34,18,06,F9,02,1C
290 DATA 08,3B,47,1B,3C,34,18,06,02,1B,08,3A,47,1A,18,34
300 DATA 18,06,02,1A,07,1D,30,18,06,41,1D,80,31,18,06,1F
310 DATA 60,4C,00,3F,07,5D,B4,88,F9,37,18,06,01,80,00,7A
320 DATA 07,03,00,80,96,07,03,00,40,A1,07,04,00,80,AE,07
330 DATA 04,00,40,B9,07,05,00,80,C6,07,1C,00,1C,01,07,41
340 DATA B4,87,44,00,02,34,18,06,42,00,03,D6,40,10,0C,21
350 DATA 00,FA,56,60,54,F7,09,3A,31,18,06,42,1A,17,37,18
360 DATA 06,08,3A,47,1A,18,34,18,06,02,1A,37,18,06,09,3B
370 DATA 31,18,06,42,1B,3B,37,18,06,08,3B,47,1B,3C,34,18
380 DATA 06,02,1B,37,18,06,F9,02,1C,37,18,06,-1
It's not necessary to use the CLEAR command to reserve machine code area. The clock starts with "00:00:00"
because there is no system time unlike the PB-1000. The keys for adjusting the clock are: "("= dec hours,
")"= inc hours, "["= dec minutes, "]"= inc minutes, "|"= clear seconds und "BRK" for exit. I haven't used
the function keys to be able to clean the display without changing the time inadvertently. It's possible
to remove the OM-53B while the clock is running, but in this case the BRK key is disabled and a reset is
needed to stop the clock.

The third byte of the ML code represents the number of leap seconds per day in the range of -59 to +59.
My PB-2000C needs +4 leap seconds that means the clock shows "23:59:59" for 5 seconds. -4 leap seconds
means that the clock jumps directly from "23:59:55" to "00:00:00".

Have fun with your new CASIO DQ-2000C
Avatar du membre
ledudu
Fonctionne à 14400 bauds
Fonctionne à 14400 bauds
Messages : 5635
Enregistré le : 26 mars 2009 13:07
Localisation : Ile de France
Contact :

Re: CASIO "DQ-2000C"

Message par ledudu »

Thanks !
I'll soon test your program.. :slime:
Avatar du membre
Marcus von Cube
Fonctionne à 1200 bauds
Fonctionne à 1200 bauds
Messages : 914
Enregistré le : 20 avr. 2006 13:48
Localisation : Wehrheim, Allemagne
Contact :

Re: CASIO "DQ-2000C"

Message par Marcus von Cube »

It looks like you need to have the BASIC cartridge to enter the program.
Avatar du membre
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 292
Enregistré le : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

Re: CASIO "DQ-2000C"

Message par Xerxes »

Marcus von Cube a écrit :It looks like you need to have the BASIC cartridge to enter the program.
Yes, because it's rather complicated to start machine code on the AI-1000/PB-2000C normally and besides, a test
with starting the code in the C environment showed some abnormal behaviour, that I've not investigated deeper yet.
Of course it's easier to use a PB-1000 instead, but the external power is an issue here and the PB-2000C is clearly
the nicer pocket from my aesthetical point of view.
Avatar du membre
ledudu
Fonctionne à 14400 bauds
Fonctionne à 14400 bauds
Messages : 5635
Enregistré le : 26 mars 2009 13:07
Localisation : Ile de France
Contact :

Re: CASIO "DQ-2000C"

Message par ledudu »

With my AI-1000 :

http://casio.ledudu.com/images/pockets/ ... _clock.jpg
http://casio.ledudu.com/images/pockets/ ... k_1967.jpg
[modo edit] bigger pictures please, bigger ... [/modo edit]
EDIT : :oops:
Modifié en dernier par ledudu le 27 déc. 2012 14:30, modifié 1 fois.
Avatar du membre
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 292
Enregistré le : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

Re: CASIO "DQ-2000C"

Message par Xerxes »

Merci for choosing the AI-1000. :wink:
Avatar du membre
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 292
Enregistré le : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

Re: CASIO "DQ-2000C"

Message par Xerxes »

I was asked for the assembly source code. Voilà:

Code : Tout sélectionner

     ORG   &H0600
     LD    $29,0
     XRL   $26,$26,L3
     CLT
     PST   UA,&H15
     PRE   IZ,&H0C10
     ST    $31,(IZ+#0)
     LDW   $0,&H0201
     STW   &H0000,(#2)
@00: FST
     LDL   $3,$26,L3
     AN    $3,&H0F
     AN    $4,&H0F
     AN    $5,&H0F
     ADBL  $3,&H00,L3
     LDL   $0,$26,L3
     DID   $0
     DID   $1
     DID   $2
     ADBL  $0,#2,L3
     ADBL  $0,#2,L3
     ADBL  $0,#2,L3
     ADBL  $0,#2,L3
     ADBL  $0,$3,L3
     LD    $21,$2
     LD    $22,$1
     DIU   $22
     OR    $22,&H0A
     LD    $23,$1
     DID   $23
     OR    $23,&HA0
     LD    $24,#2
     LDW   $15,&H0203
     LD    $19,8
@01: LD    $25,#0
     DIUL  $21,L5
     BIU   $25
     LD    $0,$25
     BIU   $0
     AD    $25,#2
     PRE   IZ,&H0E1B
     LDD   $0,(IZ+$25)
     LD    $18,6
@02: LDI   $5,(IZ+#0)
     LD    $17,8
@03: DIUL  $1,L4
     BIU   $5
     JR    NC,@04
     OR    $1,&H0F
@04: SB    $17,#1
     JR    NZ,@03
     BIDW  $4
     RODW  $2
     BIDW  $4
     RODW  $2
     LD    $17,4
@05: PRE   IX,$15
     STD   $4,(IX+#0)
     STD   $3,(IX+192)
     STD   $2,(IX+192)
     STD   $1,(IX+192)
     ADW   $15,#1
     SB    $17,#1
     JR    NZ,@05
     SB    $18,#1
     JR    NZ,@02     
     SB    $19,#1
     JR    NZ,@01
     PRE   IX,&H0201
     LD    $9,&H82
     XRW   $10,$10
     LD    $19,2
@06: PCB   &HFF
     OCBL  $9,L3
     PCB   &HFE
     LD    $18,4
@07: LD    $17,12
@08: LDIL  $1,(IX+#0),L8
     OCBL  $1,L8
     SB    $17,#1
     JR    NZ,@08
     LDD   $0,(IX+96)
     SB    $18,#1
     JR    NZ,@07
     LD    $9,&H92
     PRE   IX,&H0261
     SB    $19,#1
     JR    NZ,@06
     SLW
@09: PRE   IX,@15
     LD    $19,6
@10: LDIL  $2,(IX+#0),L5
     PST   IA,$2
     GRE   KY,$0
     PST   IA,&H40
     ANCW  $3,#2
     JR    Z,@11
     JPW   $5
@11: SB    $19,#1
     JR    NZ,@10
@12: GST   TM,$0
     GST   TM,$1
     XRC   $1,#2
     JR    NZ,@12
     AN    $0,&H3F
     XRC   $28,#2
     JR    Z,@09
     LD    $28,#2
     XRC   $28,#0
     JR    Z,@13
     XRC   $26,23
     JP    NZ,@00
     XRC   $27,59
     JP    NZ,@00
     LD    $0,$29
     AD    $0,60
     XRC   $28,#2
     JP    NZ,@00
     CLT
     LD    $28,#0
@13: AD    $27,#1
     XRC   $27,60
     JP    NZ,@00
     LD    $27,#0
     AD    $26,#1
     XRC   $26,24
     JP    NZ,@00
     LD    $26,#0
     XRC   $29,#0
     JP    Z,@00
     SBC   $29,&H80
     JP    NC,@00
@14: GST   TM,$0
     AN    $0,&H3F
     XRC   $29,#2
     JR    NZ,@14
     CLT
     JP    @00
@15: DB    1
     DW    &H0080,@16
     DB    3
     DW    &H8000,@17
     DB    3
     DW    &H4000,@18
     DB    4
     DW    &H8000,@19
     DB    4
     DW    &H4000,@20
     DB    5
     DW    &H8000,@21
@16: GPO   $0
     GPO   $1
     XRC   $1,#2
     JR    NZ,@16
     ANC   $0,&H02
     JP    NZ,@00
     LD    $0,&H03
     PRE   IZ,&H0C10
     ST    $0,(IZ+#0)
     FST
     PST   UA,&H54
     RTN
@17: SB    $26,#1
     JP    NC,@00
     LD    $26,23
     JP    @00
@18: AD    $26,#1
     XRC   $26,24
     JP    NZ,@00
     LD    $26,#0
     JP    @00
@19: SB    $27,#1
     JP    NC,@00
     LD    $27,59
     JP    @00
@20: AD    $27,#1
     XRC   $27,60
     JP    NZ,@00
     LD    $27,#0
     JP    @00
@21: CLT
     LD    $28,#0
     JP    @00
Avatar du membre
ledudu
Fonctionne à 14400 bauds
Fonctionne à 14400 bauds
Messages : 5635
Enregistré le : 26 mars 2009 13:07
Localisation : Ile de France
Contact :

Re: CASIO "DQ-2000C"

Message par ledudu »

Merci.
Avatar du membre
Xerxes
Fonctionne à 300 bauds
Fonctionne à 300 bauds
Messages : 292
Enregistré le : 02 avr. 2007 13:41
Localisation : Allemagne
Contact :

Re: CASIO "DQ-2000C"

Message par Xerxes »

Now it's possible to start the code without the OM-53B card. Merci Piotr!

The modified code for the C environment in PBF-format:

Code : Tout sélectionner

DQ2000C1.EXE,49185,49626,49185
566015D100F02AD600E20CA000021DCF7A5AF9D1000102D0400000FAC2635A4C030F4C040F4C050FCA0340C2605A1A001A011A02C84040C84040C84040C84040C860430275020276011A364E160A0277011A174E17A00258D10F03024213080219DA3580187902601918600859D6401B0E2D60194212062B,8617
05421108DA21601865B1044E010F0931B48D9844980298449802421104960F24046403C06402C06401C0882F0931B4920932B4B40933B4D0D60001024209828F6A0A4213025400FFD209405400FE42120442110CEA01E0D201E00931B4896C00600932B493420992D60061020933B4AAFBD60080C1421306,10169
EA028017029F605700408443B003DE050933B4931F601F610741B4874C003F075CB0A9025C071CB01B471A17343CC0471B3B343CC002601D48003C075C343CC0F9021C083B471B3C343CC0021B083A471A18343CC0021A071D303CC0411D80313CC01F604C003F075DB488F9373CC00610009EC1030080A5,9013
C1030040B0C1040080BDC1040040C8C1050080D5C1FA566054377C70093A313CC0421A17373CC0083A471A18343CC0021A373CC0093B313CC0421B3B373CC0083B471B3C343CC0021B373CC0F9021C373CC0,6845
How to start it: http://www.pisi.com.pl/piotr433/pb2000xe.htm
Répondre

Retourner vers « Tous les Pockets »