Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Site Bugs / Suggestions
  4. Syntax coloring

Syntax coloring

Scheduled Pinned Locked Moved Site Bugs / Suggestions
c++comdata-structureshelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Ozer Karaagac
    wrote on last edited by
    #1

    I think, there is a problem with syntax coloring for < pre lang="asm" > tag. I've noticed it on my post[^]. Some register names were colored while others not and some instructions also. I've changed it by assigning "cpp" (instead of "asm") to lang attribute in the post so that it appears more acceptable. That is not wholly assembly code already. As a suggestion: Nested "< pre >" tags might be a solution for inline assembly code (to have "asm" coloring within "cpp" syntax coloring). To generate the problem:

        push    esi
        push    edi
        push    ebx
        lea     esi, x
        lea     edi, y
        lea     edx, b
        //stage one
        mov     eax, 4
        mov     ebx, eax        ; mov   ebx, 1st dim size
    

    _loop_00:
    mov ecx, eax ; mov ecx, 2nd dim size
    _loop_01:
    movd mm0, [edx]
    movd mm1, [esi]
    paddd mm0, mm1
    ; psraw mm0, 6 ; // stage two
    movd [edi], mm0
    add esi, eax
    add edi, eax
    loop _loop_01
    add edx, eax
    dec ebx
    jnz _loop_00
    //stage two
    // ???
    pop ebx
    pop edi
    pop esi

    C 1 Reply Last reply
    0
    • O Ozer Karaagac

      I think, there is a problem with syntax coloring for < pre lang="asm" > tag. I've noticed it on my post[^]. Some register names were colored while others not and some instructions also. I've changed it by assigning "cpp" (instead of "asm") to lang attribute in the post so that it appears more acceptable. That is not wholly assembly code already. As a suggestion: Nested "< pre >" tags might be a solution for inline assembly code (to have "asm" coloring within "cpp" syntax coloring). To generate the problem:

          push    esi
          push    edi
          push    ebx
          lea     esi, x
          lea     edi, y
          lea     edx, b
          //stage one
          mov     eax, 4
          mov     ebx, eax        ; mov   ebx, 1st dim size
      

      _loop_00:
      mov ecx, eax ; mov ecx, 2nd dim size
      _loop_01:
      movd mm0, [edx]
      movd mm1, [esi]
      paddd mm0, mm1
      ; psraw mm0, 6 ; // stage two
      movd [edi], mm0
      add esi, eax
      add edi, eax
      loop _loop_01
      add edx, eax
      dec ebx
      jnz _loop_00
      //stage two
      // ???
      pop ebx
      pop edi
      pop esi

      C Offline
      C Offline
      Chris Maunder
      wrote on last edited by
      #2

      Just a matter of updating the colourisation tokens. Easily fixed.

      cheers, Chris Maunder The Code Project | Co-founder Microsoft C++ MVP

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups