News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_AMSDOS

"and a" or "or a" in an assembly keypress routine.

Started by AMSDOS, 03:29, 09 May 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Singaja

Try the one I wrote (based on others' work) , it's really good.
From: http://www.cpcwiki.eu/index.php/Programming:Random_Number_Generator & https://www.cpcwiki.eu/forum/programming/testing-those-assembly-8bit-random-number-generators/msg114333/#msg114333



   
  ;-----> Generate a random number
      ; ouput a=answer 0<=a<=255
      ld      hl,(seed_ion)
      ld      a,r
      ld      d,a
      ld      e,a
      add     hl,de
      xor     l
      add     a
      xor     h
      ld      l,a
      ld      (seed_ion),hl
      ret
   seed_ion: .dw 0x0

AMSDOS

Quote from: Singaja on 17:52, 29 June 20
Try the one I wrote (based on others' work) , it's really good.


I'll have a look at it if the examples in the following thread seem to predictable:

https://www.cpcwiki.eu/forum/programming/pseudo-random-number-generation/


Cheers.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Powered by SMFPacks Menu Editor Mod