Assembly's got me bouncing off the walls! - NEG

Поделиться
HTML-код
  • Опубликовано: 6 сен 2024
  • Basic Collision Detection using Velocity to reverse pixel direction and bounce off the walls. ☺
    Flat Assembly for NASM in Windows

Комментарии • 11

  • @maxmuster7003
    @maxmuster7003 Месяц назад +1

    Good work.❤
    I am on an Android tablet with a DosBox app installed and i use batch files as open source container to put x86 mnemonics of a routine inside the batch file to create&run a new executable com file with a little help from Debug. I made some videos(no speech) to show how it works and to share the projects. Have fun.😊

  • @maxmuster7003
    @maxmuster7003 Месяц назад

    An immediate operand (from a constant value) don’t need brackets[ ].
    And we can’t use two memory locations with [destination] operand and [source] operand in one add instruction.

    • @dillingerlee2536
      @dillingerlee2536  Месяц назад +1

      Ah yes! I forgot about not needing brackets for memory addresses. Even though I casually mentioned it in one of the early videos. Thanks.

  • @maxmuster7003
    @maxmuster7003 Месяц назад

    It is not so hard to calculate the offset address to set a single pixel writing directly into the screen memory without to use a software interrupt.
    Using 320x200x8: (segment address = 0A000h)
    Offset = (Y position * 320) + X position
    similar to = ((Y shift left 8 times) + (Y shift left 6 times)) + X
    The screen starts in the upper left corner offset 0 and one row ends at x = 319.

  • @Noironyt
    @Noironyt Месяц назад +1

    great video i would love if you could recommend anything to get a basic understanding of assembly aswell!

    • @SethChuKMKB
      @SethChuKMKB Месяц назад

      The youtube channel OpenSecurityTraining2 has a great series on Intel x86-64 asm! They helped me understand and improve at asm better than my own college professors lol.

    • @dillingerlee2536
      @dillingerlee2536  Месяц назад

      I'm not sure if you're aware that this is part of an ongoing series where I am attempting to do just that!
      ruclips.net/p/PLJv7Sh0ZDUnr7euvXvdMJPqgxbFukivl8

    • @Noironyt
      @Noironyt Месяц назад

      @@dillingerlee2536 perfect just what i was looking for🙌

  • @maxmuster7003
    @maxmuster7003 Месяц назад

    We can wait for the vsync at port 03DAh multiple times in a loop to slow down the movement and to prevent flickering. We are on 60hz refresh rate, so this run the same speed (depends on how many loops we use for delay) with all CPU no matter how fast the CPU is.

    • @dillingerlee2536
      @dillingerlee2536  Месяц назад +1

      Have you verified this works using NASM on Windows? I have been unable to get any clock functions to return anything but 0. Also remember I am nor relying on any Interrupts that are only available under DosBox

    • @maxmuster7003
      @maxmuster7003 Месяц назад

      @@dillingerlee2536 I never tried it on Windows, but on MS DOS.