[RESOLVED] Connect assembly lang to VB
Hi :wave: ,
I'm doing a project that involves a connection between assembly to VB.There is a switch that is connected to a IC chip.Anyone know where is the link between the assembly lang to the VB code?Thanks alot.
LoopForData
pagesel GetEP1
banksel outbuffer
bankisel outbuffer
movlw outbuffer
movwf FSR
movlw 0x8
call GetEP1 ; try and read data sent from the PC
pagesel ProcessOUTBuffer
btfsc STATUS,C ; If we got a packet
call ProcessOUTBuffer ; process it
banksel flagreg ; test if we have PICNET data
btfsc flagreg,1 ; to send to PC?
goto picnetdata
btfsc flagreg,2 ; test for local reply to send
goto localreply
goto LoopForData ; no
picnetdata
bcf flagreg,1 ;reset picnet reply flag
pagesel ProcessINBuffer
call ProcessINBuffer ; make a new packet
goto Pkt2PC ;send data back to PC
localreply
bcf flagreg,2 ;reset local reply flag
Pkt2PC
pagesel PutEP1
bankisel outbuffer
banksel outbuffer
movlw outbuffer
movwf FSR
movlw 0x8 ; 8 bytes
call PutEP1 ; send data to PC
pagesel LoopForData
goto LoopForData ; repeat
Re: Connect assembly lang to VB
eh? what are you talking about :)
are you trying to write assembly language into visual basic.?
Whats an IC chip :S I'm not sure
Thats not x86 language.
Cheers.
Re: Connect assembly lang to VB
About the best you can do is:
a) Write a dll in assembler. Use it in VB.
b) Define a large string variable in VB. Use that space to store the machine language routine. Use your method of choice to call the address of the ML routine.
Or you could just reanalyze your situation and use VB to read from and write to the device. What's the physical connection? Serial? Parallel?
(VB is NOT the proper language to use to solve this type of problem, unless the communications between the device and the PC is something VB can handle.)
Re: Connect assembly lang to VB
Thanks for your solution.