I'm new here, i had a 41C in 80's now i use the very good i41Cxplus emulator on iPhone.
Since i found this forum i decide to work again in programation.
It's my Job for 30 years now. I use generaly C language but i used for long time ASM for Z80 808.. 6809 and lot of Microcontroler.
i found on this site the SDK v6 and i begin to study the MCode. i write some little thing who is working in SDK under Win XP and in rom format ob i41CX
but i've and issue with long Jump
I write a litle code where i made a Test for Long Jump i trywith JC ( Displacement < 64) it's work perfectly but when i replace JC by CGO to realize a long Jump the program don't jump if the OP on label targeted by CGO or NCGO is NOP
does it make sense ??????
- Code: Select all
* MYROM.SRC
* Assembled by A41
* Thu Feb 16 00:02:06 2017
.TITLE "MYROM"
.ZENCODE
;**********************************
;* FAT for MYROM 11 ROM *
;**********************************
0000 001 XROM 1 ;XROM number
0001 002 FCNS 2 ;Header + 1 function
0002 00008B DEFR4K [Header] 008B ;first executable of header
0004 00008E DEFR4K [T2] 008E ;second executable : function T2
0006 000 NOP ;FAT termination
0007 000 NOP ;FAT termination
;***********************************
.FILLTO 0081
;**** Header
.NAME "*MYROM 11"
*0082 0B1 #0B1 ; "1"
*0083 031 #031 ; "1"
*0084 020 #020 ; " "
*0085 00D #00D ; "M"
*0086 00F #00F ; "O"
*0087 012 #012 ; "R"
*0088 019 #019 ; "Y"
*0089 00D #00D ; "M"
*008A 02A #02A ; "*"
008B 3E0 [Header] RTN
;************************************************************
;* Just for Test Purpose
;************************************************************
.NAME "T2"
*008C 0B2 #0B2 ; "2"
*008D 014 #014 ; "T"
008E 260 [T2] SETHEX ; INIT Hex Mod
008F 0A0 PT=P ; Pt = P
0090 04E C=0 ALL ; Clear
0091 2DC PT= 13 ; Load - in S
0092 250 LC 9
0093 2FE ?C#0 S ; Check if + in S
0094 00500B CGO (T2ER) 0201
0096 13000F LDI 00F ; Just to show Not Jump
0098 3E0 [T2E] RTN
.FILLTO 0200
0201 04E (T2ER) C=0 ALL ; Set User Flag 0
0202 2DC PT= 13
0203 210 LC 8
0204 10E A=C ALL
0205 3B8 C=REG 14(d)
0206 370 C=CORA
0207 3A8 REG=C 14(d)
0208 2DC PT= 13 ; Load - in S
0209 250 LC 9
020A 2FE ?C#0 S ; Check if + in S
020B 005013 CGO (T2ER1) 0401
020D 13000F LDI 00F ; Just to show Not Jump
020F 3E0 RTN
.FILLTO 0400
0401 000 (T2ER1) NOP
0402 04E C=0 ALL ; Set User Flag 1
0403 2DC PT= 13
0404 110 LC 4
0405 10E A=C ALL
0406 3B8 C=REG 14(d)
0407 370 C=CORA
0408 3A8 REG=C 14(d)
0409 3E0 RTN
Second thing i work with MCODE for Beginners - Ken Emery it's a good book but does exist a real Processor OP Sheet with all OP in the 3 Form of ASM Zencode, HP, and JDA with all explaination of OP ?
Regards from France
Cheers
Khan-Dam