• No results found

drawstack.sty: Draw execution stack easily in LaTeX

N/A
N/A
Protected

Academic year: 2021

Share "drawstack.sty: Draw execution stack easily in LaTeX"

Copied!
6
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

drawstack.sty: Draw execution stack easily in

LaTeX

Matthieu Moy

December 19, 2012

drawstack is a LaTeX package to easily draw execution stack (typically to illustrate assembly language notions), written on top of TikZ. This file serves as an example of usage of drawstack, and serves as documentation for this package. Read the source code and comments to see how to use it.

1

Minimalistic example

...

First cell

Second cell

(2)

2

Grouping cells into stack frames

...

First cell

Second cell Some stack frame

Not interesting

Next stack frame

Next stack frame Another stack

frame

...

3

Stack and Base pointers

...

loc2 -8(%ebp)

loc1 -4(%ebp)

(3)

4

Padding

... above padding nothing here below padding ...

5

Below/Above stack pointer

...

Top

Below top

Above bottom Stack pointer here

Bottom

(4)

6

Highlighting some cell

...

Uninteresting cell

Interesting cell

...

Yes, this one!

7

Structures without a stack structure

(5)

8

Structures and stack together

... p3 11(GB) p2 10(GB) p1 9(GB) @P3D.diag 8(GB) @Object.equals 7(GB) 3(GB) 6(GB) @P2D.diag 5(GB) @Object.equals 4(GB) 1(GB) 3(GB) @Object.equals 2(GB) null 1(GB) Stack z=2,5 y=2,5 x=2,5 . y=1 x=1 . Heap

9

Using tikzpicture instead of drawstack

... My cell

(6)

10

Changing style

... Uninteresting cell Interesting cell bcell Padding ...

Yes, this one!

11

Example: Computing Factorial

Referenties

GERELATEERDE DOCUMENTEN

Example 7: The following sequence of commands placed in the body of the document produces the label John Smith 123 Main Street.. City,

Praesent pretium, magna in eleifend egestas, pede pede pretium lorem, quis consectetuer tortor sapien facilisis magna. Mauris quis magna varius nulla

The pgfopts package allows keys defined with pgfkeys to be used as class or package options, in the same way that kvoptions extends keyval.. Users of pgfopts should be familiar with

Praesent pretium, magna in eleifend egestas, pede pede pretium lorem, quis consectetuer tortor sapien facilisis magna.. Mauris quis magna varius nulla

commentchar (character) : character to define comments in the verbatim code, so that lines starting with this character will not be printed (Default: empty).. 2 For clarification

If the page breaks immediately before the stage direction, or duringit, no continuation message will be given. If it breaks after the stage direction, and before the next speaker

The other thing we do is define a command \includedoc, which includes a file which is allowed to have its own \documentclass and \begin{document} and \end{document} and

The idea presented here follows a standard LaTeX pattern – run LaTeX twice, once before Python, leaving breadcrumbs for Python to pickup during its run, then a final LaTeX run