I am having exactly the same problem with gnu assembly language.

The source:

.. literalinclude:: progs/chap03/convertHex.c
   :language: c
   :linenos:

produces syntax highlighted C code with line numbers.

But the source:

.. literalinclude:: progs/chap10/yesNo2.s
   :language: gas
   :linenos:

has no highlighting nor line numbers.

When I use pygmentize from the command line:

bob@bob-desktop:~/my_book_sphinx/progs/chap10$ pygmentize -l gas yesNo2.s

I get nicely highlighted code.

--Bob

On 11/21/2011 12:53 AM, Rishi Agrawal wrote:
Hi All,


I am using Sphinx for writing a document on assembly level programming and I must say that its the best tool for writing any documentation.

I am facing a small issue here


I have one piece of code which is as follows. This code is not getting highlighted.
---------------------
/; Printing 'A'/

/.model small

*.data

.code
*
    ; Set the data segment.
    MOV AX, @DATA
    MOV DS, AX


; We will move the ASCII value of 'A' in the DL register.
    MOV DL, 41H

; We will move 02H in the AH register, this will ask int 21h to print a single character.
    MOV AH, 02H
    INT 21H


    MOV AX, 4C00H
    INT 21H

*    END*/*
*-----------------------
While when I changed the code to the following its getting highlighted properly. I am not getting why is this happening. The only difference is the bolded part.
--------------------------
/; Printing 'A'

.model small

*DATA SEGMENT

DATA ENDS
*

*CODE SEGMENT
*
    ; Set the data segment.
    assume cs:code, ds: data

; We will move the ASCII value of 'A' in the DL register.
    MOV DL, 41H

; We will move 02H in the AH register, this will ask int 21h to print a single character.
    MOV AH, 02H
    INT 21H


    MOV AX, 4C00H
    INT 21H

*CODE ENDS
    END */*
*----------------------------

I tried uploading the code on the website http://pygments.org/ and found that both the code are getting highlighted properly.

The version of pygments on the system is

/ $ pygmentize -V
Pygments version 1.3.1, (c) 2006-2008 by Georg Brandl.
/

--
Regards,
Rishi Agrawal

--
You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to sphinx-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sphinx-dev?hl=en.

--
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to