Include ASM file help


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2005
    Location
    France
    Posts
    50

    Default Include ASM file help

    HI,

    A friend of mine has done a small routine with PROTON but I use PBP.
    He send me ASM & BAS files.

    This is a very short prog: (myvar.bas)

    Dim freqlol As Byte
    Dim freqloh As Byte
    Dim freqhil As Byte
    Dim freqhih As Byte
    Dim freq As Dword
    Dim frg As float
    Dim frg2 As Dword
    dim w1 As frg2.word1
    dim w0 as frg2.word0


    freq = 24000000

    frg = freq / 931.322
    frg2 = frg * 10000
    freqlol = w0.byte0
    freqloh = w0.byte1
    freqhil = w1.byte0
    freqhih = w1.byte1

    This subroutine could help me to calc a value (32 bits and floating point) for "freq" (freq is not always 24000000 but to test my PBP prog this the test value)

    My PBP test prog is:

    Asm
    include "myvar.INC"
    Endasm

    serout2 portb.0,84,["go",10,13]
    serout2 portb.0,84,[dec FREQHIH" ",DEC freqhil," ",DEC freqloh," ",DEC freqlol]

    end

    Just to try if I can get the values I need for my DDS
    "myvar.INC" is the asm prog done from my friend (myvar.asm renamed)
    But when I try to compile, I have errors

    someone can help ?

    Harryweb

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    error---------------Dim freqlol As Byte
    error---------------Dim freqloh As Byte
    error---------------Dim freqhil As Byte
    error---------------Dim freqhih As Byte
    double-error--------Dim freq As Dword
    double-error--------Dim frg As float
    double-error--------Dim frg2 As Dword
    error---------------dim w1 As frg2.word1
    error---------------dim w0 as frg2.word0

    error---------------freq = 24000000

    error---------------frg = freq / 931.322
    possible error depending on value of frq--------frg2 = frg * 10000

    freqlol = w0.byte0
    freqloh = w0.byte1
    freqhil = w1.byte0
    freqhih = w1.byte1

    needed? Nope...---------------------Asm
    loads of errors because of above------include "myvar.INC"
    needed? Nope...---------------------Endasm

    serout2 portb.0,84,["go",10,13]
    I count at least one error here also...--serout2 portb.0,84,[dec FREQHIH" ",DEC freqhil," ",DEC freqloh," ",DEC freqlol]

    someone can help ?
    [/QUOTE]

    Yes, someone can help...
    After you taken a look at the manual and can tell why the above lines won't compile (no, it's not hidden magic or anything, they're right there in the PBP manual).
    Last edited by skimask; - 3rd May 2007 at 20:25.

Similar Threads

  1. Continuous Interrupts when using DT_INTS and an INCLUDE file
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 15th January 2010, 21:42
  2. can't find include file!
    By jimbostlawrence in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 10th November 2009, 08:44
  3. MCSP - Cannot find include file
    By Andy Wood in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 21st January 2008, 01:37
  4. Using ASM files as include
    By Josuetas in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th August 2007, 20:40
  5. The ultimate include file
    By bearpawz in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 26th January 2007, 19:35

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts