New Online Assembly PIC Compiler-Beta Test

Art

Joined Sep 10, 2007
806
It shouldn’t be difficult at all to support 16F628A with 16F84A support as a starting point.
Write CMCON 0x07h, and the rest of the code for 16F84A should run.
Then you just need the analogue support, and new registers like those for UART, etc,
and you have 876/877 and some other midrange pics as well.

Having said that, I can’t imagine wanting to use an online compiler over MPLab.
You can install Windows as a separate boot on it, and run MPlab on a Mac.
Cheers, Art.
 

Thread Starter

Mustafa Tekno

Joined Aug 18, 2015
14
It shouldn’t be difficult at all to support 16F628A with 16F84A support as a starting point.
Write CMCON 0x07h, and the rest of the code for 16F84A should run.
Then you just need the analogue support, and new registers like those for UART, etc,
and you have 876/877 and some other midrange pics as well.

Having said that, I can’t imagine wanting to use an online compiler over MPLab.
You can install Windows as a separate boot on it, and run MPlab on a Mac.
Cheers, Art.
Hello Art,
Yep you are true, there are just a few add ons, the general framework will be similar:)
MT
 

JohnInTX

Joined Jun 26, 2012
4,787
@Mustafa Tekno
I tried a couple of examples and a few things on my own using your online tool. The discussions of which PIC to use and my own comments on learning assembler aside, I actually think it could be quite useful for beginners. I was able to bang a few lines of assembler in, build it and step within a few minutes. That's kind of cool. For a rank beginner who wants to at least get the feel of PIC and assembler language, it has the unique advantage of not having to wade through MPLAB projects, PIC selections etc. The sample projects are useful in that they give more code to play with that can be modified to give the newbie a feel of the development process. I don't think it would (or should) replace MPLAB for program development but as a tool to teach beginners, I think its an interesting approach.

Some initial shortcomings I noticed:
The register displays do not update when loaded i.e. WREG, PORTx etc.
Numerical representations should include all of those supported by MPASM e.g. 55h is valid in MPASM, not in this one.
The END directive should be fully implemented. MPASM and virtually every other assembler requires END. If this becomes a training tool, you don't want to train users the wrong way. To go past a simple trainer, MPASM compatibility will be a necessity, I think, especially if user's try to run code they find here and elsewhere on the net.

This code should have set PORTB to an output and toggled its bits. It did not appear to do so.
Code:
bsf STATUS,5
  clrf  TRISB
  bcf STATUS,5

loop
movlw 0x55
movwf PORTB
nop
movlw 0xaa
movwf PORTB

nop
goto loop
So yeah, interesting! Good luck with it.

BTW I see that the language choices include Turkey? Is that where you are located?
 

Thread Starter

Mustafa Tekno

Joined Aug 18, 2015
14
@Mustafa Tekno
I tried a couple of examples and a few things on my own using your online tool. The discussions of which PIC to use and my own comments on learning assembler aside, I actually think it could be quite useful for beginners. I was able to bang a few lines of assembler in, build it and step within a few minutes. That's kind of cool. For a rank beginner who wants to at least get the feel of PIC and assembler language, it has the unique advantage of not having to wade through MPLAB projects, PIC selections etc. The sample projects are useful in that they give more code to play with that can be modified to give the newbie a feel of the development process. I don't think it would (or should) replace MPLAB for program development but as a tool to teach beginners, I think its an interesting approach.

Some initial shortcomings I noticed:
The register displays do not update when loaded i.e. WREG, PORTx etc.
Numerical representations should include all of those supported by MPASM e.g. 55h is valid in MPASM, not in this one.
The END directive should be fully implemented. MPASM and virtually every other assembler requires END. If this becomes a training tool, you don't want to train users the wrong way. To go past a simple trainer, MPASM compatibility will be a necessity, I think, especially if user's try to run code they find here and elsewhere on the net.

This code should have set PORTB to an output and toggled its bits. It did not appear to do so.
Code:
bsf STATUS,5
  clrf  TRISB
  bcf STATUS,5

loop
movlw 0x55
movwf PORTB
nop
movlw 0xaa
movwf PORTB

nop
goto loop
So yeah, interesting! Good luck with it.

BTW I see that the language choices include Turkey? Is that where you are located?
Thanks A lot:) for your detailed analysis and feedback:) We will add the hexadecimal representation (55h) and
and END. The code you wrote here is working well in my PC. That maybe because of browser compatibility issues. Can you please tell the browser you are using? We can handle it quickly if it is beacuse of browser issues.
Yep I live in Turkey:)
MT.
 

JohnInTX

Joined Jun 26, 2012
4,787
I use FireFox 39.0 with AdBlock Plus, Animated GIF blocker enabled and JavaScript disabled. I probably need to do some updating..

We had the pleasure of touring some of Turkey last year. Great people and Istanbul is one of my favorite cities.

EDIT: I updated FF and Java and its working but I think the problem was that I was using SKIP instead of STEP INTO to step the code. It looks like your SKIP actually skips the execution of the line - in MPLAB and others, SKIP is used to step through things like calls to a subroutine. It still executes the subroutine i.e. does NOT skip the call but it does not step through each statement in the subroutine, that's what STEP INTO is for. I would review what you want it to do and update the names of the buttons to agree with other systems.

EDIT2: Allow a colon : to follow labels - makes them easier to see in the code and to search for. I would force labels to begin in column 1 - that's different than MPASM but common in other assemblers. The reason is so that the assembler can make the distinction between labels and macros.

A TAB with preset stops at opcode, operand and comment would go a long way towards enforcing readable code, especially for newbies.

I like the way the IO follows the TRIS settings and the highlighting of the selected bank.
 
Last edited:

Thread Starter

Mustafa Tekno

Joined Aug 18, 2015
14
I use FireFox 39.0 with AdBlock Plus, Animated GIF blocker enabled and JavaScript disabled. I probably need to do some updating..

We had the pleasure of touring some of Turkey last year. Great people and Istanbul is one of my favorite cities.

EDIT: I updated FF and Java and its working but I think the problem was that I was using SKIP instead of STEP INTO to step the code. It looks like your SKIP actually skips the execution of the line - in MPLAB and others, SKIP is used to step through things like calls to a subroutine. It still executes the subroutine i.e. does NOT skip the call but it does not step through each statement in the subroutine, that's what STEP INTO is for. I would review what you want it to do and update the names of the buttons to agree with other systems.

I like the way the IO follows the TRIS settings and the highlighting of the selected bank.
Cool:) It is good to hear that, the program has worked. I guess the name for this skipping line with execution is step over in MPLAB. Skip is something different in OPC, as you say, it does not execute the current line. We thought that it would be helpful to a beginner if he wants to see the effects without executing some of the lines. Step over is in our schedule:) Honestly, because it requires a bit more effort in javascript, php and etc. we put it in future works:D Your feedbacks are really very helpful:) Thanks a lot.
I am living very far away from Istanbul, but it is one of my favorite cities, as well:)
MT
 

JohnInTX

Joined Jun 26, 2012
4,787
I guess the name for this skipping line with execution is step over in MPLAB. Skip is something different in OPC, as you say, it does not execute the current line. We thought that it would be helpful to a beginner if he wants to see the effects without executing some of the lines.
I think that's a good feature, just call it something else to avoid confusion - 'bypass line' maybe. I agree that the MPLAB names are confusing but may as well keep them consistent.

SIMULATE as you have it is usually called ANIMATE as well. I do like the variable speed.

You're welcome, see EDIT2 above.

A true story supporting consistency: We bought a new super HiDef video camera for my son's graduation. It has a red dot to indicate RECORD and a GREEN dot for stop. Unfortunately, in the several months before the trip I was using a data analyzer that had a GREEN dot for RUN and a RED dot for STOP. You can guess the results - instead of video of the ceremony, I have some absolutely stunning HD video of the underside of my seat in the stadium - I mean, the quality is something to behold - its just not what I thought I was getting. I'm not stupid but this one got me.
 
Last edited:

Thread Starter

Mustafa Tekno

Joined Aug 18, 2015
14
I think that's a good feature, just call it something else to avoid confusion - 'bypass line' maybe. I agree that the MPLAB names are confusing but may as well keep them consistent.

SIMULATE as you have it is usually called ANIMATE as well. I do like the variable speed.

You're welcome, see EDIT2 above.
Good idea:)
 
Top