Micro Assembler commands converting 08m to pic12f629

ashleylad

Member
Hi all, I want to dump some of my basic 08m programs into a handful of 12f629 chips I have and keep my picaxe chips for other jobs. Is there any info somewhere about using the BAS programmer and picaxe programming editing software to do the assembler conversion. I have done several previously but now know that do and loop are not permitted so looking for some pointers.

cheers
 

hippy

Ex-Staff (retired)
There are some potentially useful documents under the Help -> Assembler Datasheets menu within Programing Editor.
 

ashleylad

Member
thanks hippy, forgot how I found the info last time. According to the sheet there is no mention that - do and loop or until are not supported.

nick yes IF is permitted as I have converted others with IF statements.
 

hippy

Ex-Staff (retired)
I would work on the principle that if it's not mentioned, or isn't available for the 08 ( the original "08" ), then it probably is not supported.
 

ashleylad

Member
Agreed hippy think you are correct, shame it's a handy tool. Here is a snippet of info from a .asm last date appears to be 2003 so yes original 08 IC.

;Generated by: BAS2ASS Compiler (Programming Editor)
;File Version: 3.20
;From source : c:\docume~1\test\locals~1\temp\code.bas
;Copyright: (c) Revolution Education Ltd 1997-2003
;Web: www.rev-ed.co.uk

;Limitations: Please see end of file below.




These are the limitations from the bottom of the .asm, I knew I had read it somewhere, when I was trying to use pulsin for an r/c switch circuit.

;Current BASIC to Assembler Restrictions
;1) Only byte variables are supported
; (i.e. b0-b13,pins,dirs)
;2) These commands are not supported:
; branch, button, debug, lookdown, lookup, pot, pwm, pulsin, serin
; readmem, writemem, servo, infrain, keyin, setint, readtemp, i2c, pwmout
;3) These commands have the following restrictions:
; readadc: 16F819 / 16F872 only supported
; sleep: delay is number x 2.3s
; serout: baud rate 2400 only

 

ashleylad

Member
This is the code I threw in to try from a led sequence select circuit from last week:-

Code:
symbol mode=b13
mode = 1
do

  if pin3 = 1 then
    do loop until pin3 = 0
    mode = mode + 1
    if mode > 4 then 
      mode = 1
    endif
endif
    select mode
      case 1
      high 0:high 1
high 2: low 4
pause 250
low 2: high 4
pause 250


case 2
high 0, 1, 2, 4

case 3
high 0: high 1
High 2:high 4
pause 20
low 2:low 4
pause 90
high 2:high 4
pause 20
low 2:low 4
pause 90
pause 200


case 4
high 0:high 1
high 2:high 4
pause 20
low 2:low 4
pause 750 
    end select
 
loop
If fails compile straight away, and looking at the other commands I would be surprised if the select mode would work.
 
Top