Coder Social home page Coder Social logo

Why add 1 to stats? about coab HOT 6 CLOSED

Pajamaman avatar Pajamaman commented on August 22, 2024
Why add 1 to stats?

from coab.

Comments (6)

simeonpilgrim avatar simeonpilgrim commented on August 22, 2024
ovr018:15FB         mov     al, 3
ovr018:15FD         push    ax
ovr018:15FE         mov     al, 6
ovr018:1600         push    ax
ovr018:1601         call    @roll_dice$q4Word4Word ; roll_dice(Word,Word)
ovr018:1606         xor     ah, ah
ovr018:1608         inc     ax
ovr018:1609         mov     [bp+stat_value], al

because that's what it does here.

from coab.

simeonpilgrim avatar simeonpilgrim commented on August 22, 2024

As to why that was how it was coded, not sure.

from coab.

Pajamaman avatar Pajamaman commented on August 22, 2024

Internesting...

I have no idea what I'm looking at 👍

from coab.

simeonpilgrim avatar simeonpilgrim commented on August 22, 2024

the values 6 and 3 are used to call roll_dice, and then the results are incremented prior to being inserted into the state_value memory location..

from coab.

Pajamaman avatar Pajamaman commented on August 22, 2024

Wow, I wouldn't have been able to figure that out. Is this assembly?

from coab.

simeonpilgrim avatar simeonpilgrim commented on August 22, 2024

yes, the x86 16 bit asm

from coab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.