Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

charles wrote:nyh i did it my self !
now anyway you look at it its all "cut and paste "
unless you write your own
compilier ,editor and fabricate your very own list of commands.
that is what i'm trying nyh ,
form_alert #1,#text
thats all






lp wrote:I think the bit with the 28 byte header can be ignored. I don't have the manual in front of me, but I think I recall the magic value in the header, first word is the equivalent to a branch always with an offset of 28. Thus the header is skipped. So just having the address of the inline itself is enough.
Some other asm user can confirm this I'm sure.


charles wrote:daeghnao lets do a walk though if time permits(step by step) .
here is what i include and have got so far .
recyrs_v.gfa -a file that insures my inline or open loads the files
char.s - a simple what for keypress in asm source file
1.gfa -the whole target project, doesn't work bombs
gfa_3_6.prg - the gfa editor..
ok try it out , from how i conceive the instructions this is what i madde of it , i did many attempts ,


' inline kinda sucks ,no allocation ,just magic numbers,variable declaration?
'
INLINE rm%,102
'
' another magic number, : file size...pooof !!! with no way re-adjust



charles wrote:nope no joke ,
there must be a method to convert my
" .s" file
into a file of
binary
or
hexcidecimal .




charles wrote:gee finally ,
i will try right now and see what results
thats what was making no sence to me ,
that when i opened up with text editor and looked into the example files,
they were comprised of only a series of what appeared to be a series of values ,
not a compilied program ,,, and then to top it all off , the gfa manual only listed hexadecimal values or the data area of the vector to address for my rcall /call/c:
command.
to be honest i saw a rcall or call example in some 'c' bindings that were not compilied and this is what makes programming from text/resource so damn hard....
ok b back later
charles




Hi People,
A while back, Ted Lyngmo asked that I post a snippet of code that I sent
him which echoes MIDI in to MIDI thru. Here it is:
---- cut here ----
*
* through.s -- MIDI input handler routine to simulate MIDI thru
*
csect text,code
xdef _install_thru,_uninstall_thru ; export entry points
xref _thru_channel ; reference external value
midisend equ $fffffc06 ; MIDI output register
midiread equ $fffffc06 ; MIDI input register
midictrl equ $fffffc04 ; ACIA control register
midistat equ $fffffc04 ; ACIA status register
mfpiis equ $fffffa11 ; MFP
bit6 equ $40 ; ..MIDI ACIA bit
notbit6 equ $bf
_install_thru:
move.w #$0022,-(a7) ; push Kbdvbase function code
trap #14 ; Xbios
addq.l #2,a7 ; tidy stack after Xbios
movea.l d0,a0 ; copy address of Kbdvbase table
move.l (a0),oldvec ; save first entry (midivec)
move.l #interrupt,(a0) ; install our routine
rts ; return
_uninstall_thru:
move.w #$0022,-(a7) ; Kbdvbase
trap #14 ; Xbios
addq.l #2,a7 ; tidy
movea.l d0,a0 ; copy table pointer
move.l oldvec,(a0) ; restore old value
rts ; return
interrupt:
btst #3,midistat ; check MIDI output status
bne.b notready
cmp.b #$ef,d0 ; system byte?
bhi notready ; don't forward system messages
tst.b d0 ; status byte?
bpl send ; don't touch data byte
andi.b #$f0,d0 ; zero channel
or.b _thru_channel,d0 ; set to global "thru_channel"
send:
move.b d0,midisend ; echo MIDI IN to MIDI OUT
notready:
andi.b #notbit6,mfpiis ; disable interrupt-in-service bit
rts ; return
csect storage,bss
oldvec:
ds.l 1 ; old midivec place saver
end
*** through.s ***
---- cut here ----
To use, assemble this code, then link it into your C application. Set the
global variable "thru_channel" to be the MIDI channel for the resulting output
stream (this bit of code can be hacked to make the thru stream verbatim, rather
than channel-shifted). Now you can call "install_thru" and "uninstall_thru".
I hope someone finds it useful. BTW, I originally got this from someone
else: alas, I don't remember who. If anyone recognises their code, please
feel suitably pleased with yourself. :-)
Cheers,
[M][a][r][c]
** --------------------------- ** --------------------------- **
** Marc CR Bouron ** Digital Capital Markets. **
** +44 (0)895 208260 ** Harefield Place, The Drive, **
** Marc.Bou...@ime.mts.dec.com ** Uxbridge, Middlesex, **
** bour...@trout.ime.dec.com ** UB10 8AQ. UK. **
** --------------------------- ** --------------------------- **
And for my next trick, I shall disappear in a puff of smo




Users browsing this forum: CommonCrawl [Bot] and 1 guest